Skip to content

Commit

Permalink
Version-guard these specs
Browse files Browse the repository at this point in the history
net-ftp 0.3.6+ returns the response from `put` and `puttextfile`.

See ruby/net-ftp#34
  • Loading branch information
headius committed Jun 27, 2024
1 parent baec29e commit 2fe4801
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions spec/ruby/library/net-ftp/shared/puttextfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,16 @@
remote_lines.should == local_lines.gsub("\n", "\r\n")
end

it "returns nil" do
@ftp.send(@method, @local_fixture_file, "text").should be_nil
guard -> { Net::FTP::VERSION < '0.3.6' } do
it "returns nil" do
@ftp.send(@method, @local_fixture_file, "text").should be_nil
end
end

guard -> { Net::FTP::VERSION >= '0.3.6' } do
it "returns the response" do
@ftp.send(@method, @local_fixture_file, "text").should == @ftp.last_response
end
end

describe "when passed a block" do
Expand Down

0 comments on commit 2fe4801

Please sign in to comment.