diff options
Diffstat (limited to 'spec/ruby/library/net/ftp/shared/puttextfile.rb')
-rw-r--r-- | spec/ruby/library/net/ftp/shared/puttextfile.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/ruby/library/net/ftp/shared/puttextfile.rb b/spec/ruby/library/net/ftp/shared/puttextfile.rb index 9bfdc7c41e..50e8de28e6 100644 --- a/spec/ruby/library/net/ftp/shared/puttextfile.rb +++ b/spec/ruby/library/net/ftp/shared/puttextfile.rb @@ -53,42 +53,42 @@ describe :net_ftp_puttextfile, shared: true do describe "when the STOR command fails" do it "raises a Net::FTPPermError when the response code is 532" do @server.should_receive(:stor).and_respond("532 Need account for storing files.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) end it "raises a Net::FTPTempError when the response code is 450" do @server.should_receive(:stor).and_respond("450 Requested file action not taken.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPTempError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPTempError) end it "raises a Net::FTPTempError when the response code is 452" do @server.should_receive(:stor).and_respond("452 Requested action not taken.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPTempError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPTempError) end it "raises a Net::FTPPermError when the response code is 553" do @server.should_receive(:stor).and_respond("553 Requested action not taken.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) end it "raises a Net::FTPPermError when the response code is 500" do @server.should_receive(:stor).and_respond("500 Syntax error, command unrecognized.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) end it "raises a Net::FTPPermError when the response code is 501" do @server.should_receive(:stor).and_respond("501 Syntax error in parameters or arguments.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) end it "raises a Net::FTPTempError when the response code is 421" do @server.should_receive(:stor).and_respond("421 Service not available, closing control connection.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPTempError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPTempError) end it "raises a Net::FTPPermError when the response code is 530" do @server.should_receive(:stor).and_respond("530 Not logged in.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) end end @@ -96,25 +96,25 @@ describe :net_ftp_puttextfile, shared: true do it "raises a Net::FTPPermError when the response code is 500" do @server.should_receive(:eprt).and_respond("500 Syntax error, command unrecognized.") @server.should_receive(:port).and_respond("500 Syntax error, command unrecognized.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) end it "raises a Net::FTPPermError when the response code is 501" do @server.should_receive(:eprt).and_respond("501 Syntax error in parameters or arguments.") @server.should_receive(:port).and_respond("501 Syntax error in parameters or arguments.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) end it "raises a Net::FTPTempError when the response code is 421" do @server.should_receive(:eprt).and_respond("421 Service not available, closing control connection.") @server.should_receive(:port).and_respond("421 Service not available, closing control connection.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPTempError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPTempError) end it "raises a Net::FTPPermError when the response code is 530" do @server.should_receive(:eprt).and_respond("530 Not logged in.") @server.should_receive(:port).and_respond("530 Not logged in.") - lambda { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) + -> { @ftp.send(@method, @local_fixture_file, "text") }.should raise_error(Net::FTPPermError) end end end |