summaryrefslogtreecommitdiff
path: root/spec/ruby/library/net/ftp
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/net/ftp')
-rw-r--r--spec/ruby/library/net/ftp/abort_spec.rb14
-rw-r--r--spec/ruby/library/net/ftp/acct_spec.rb12
-rw-r--r--spec/ruby/library/net/ftp/chdir_spec.rb24
-rw-r--r--spec/ruby/library/net/ftp/connect_spec.rb10
-rw-r--r--spec/ruby/library/net/ftp/delete_spec.rb14
-rw-r--r--spec/ruby/library/net/ftp/fixtures/server.rb2
-rw-r--r--spec/ruby/library/net/ftp/help_spec.rb12
-rw-r--r--spec/ruby/library/net/ftp/login_spec.rb42
-rw-r--r--spec/ruby/library/net/ftp/mdtm_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/mkdir_spec.rb12
-rw-r--r--spec/ruby/library/net/ftp/mtime_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/nlst_spec.rb20
-rw-r--r--spec/ruby/library/net/ftp/noop_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/pwd_spec.rb10
-rw-r--r--spec/ruby/library/net/ftp/rename_spec.rb24
-rw-r--r--spec/ruby/library/net/ftp/return_code_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/rmdir_spec.rb12
-rw-r--r--spec/ruby/library/net/ftp/sendcmd_spec.rb12
-rw-r--r--spec/ruby/library/net/ftp/shared/getbinaryfile.rb32
-rw-r--r--spec/ruby/library/net/ftp/shared/gettextfile.rb20
-rw-r--r--spec/ruby/library/net/ftp/shared/list.rb20
-rw-r--r--spec/ruby/library/net/ftp/shared/putbinaryfile.rb36
-rw-r--r--spec/ruby/library/net/ftp/shared/puttextfile.rb24
-rw-r--r--spec/ruby/library/net/ftp/site_spec.rb10
-rw-r--r--spec/ruby/library/net/ftp/size_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/status_spec.rb14
-rw-r--r--spec/ruby/library/net/ftp/system_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/voidcmd_spec.rb12
28 files changed, 210 insertions, 210 deletions
diff --git a/spec/ruby/library/net/ftp/abort_spec.rb b/spec/ruby/library/net/ftp/abort_spec.rb
index ff2144a3a0..57651468d8 100644
--- a/spec/ruby/library/net/ftp/abort_spec.rb
+++ b/spec/ruby/library/net/ftp/abort_spec.rb
@@ -18,7 +18,7 @@ describe "Net::FTP#abort" do
end
it "sends the ABOR command to the server" do
- lambda { @ftp.abort }.should_not raise_error
+ -> { @ftp.abort }.should_not raise_error
end
it "ignores the response" do
@@ -32,31 +32,31 @@ describe "Net::FTP#abort" do
it "does not raise any error when the response code is 225" do
@server.should_receive(:abor).and_respond("225 Data connection open; no transfer in progress.")
- lambda { @ftp.abort }.should_not raise_error
+ -> { @ftp.abort }.should_not raise_error
end
it "does not raise any error when the response code is 226" do
@server.should_receive(:abor).and_respond("226 Closing data connection.")
- lambda { @ftp.abort }.should_not raise_error
+ -> { @ftp.abort }.should_not raise_error
end
it "raises a Net::FTPProtoError when the response code is 500" do
@server.should_receive(:abor).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.abort }.should raise_error(Net::FTPProtoError)
+ -> { @ftp.abort }.should raise_error(Net::FTPProtoError)
end
it "raises a Net::FTPProtoError when the response code is 501" do
@server.should_receive(:abor).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.abort }.should raise_error(Net::FTPProtoError)
+ -> { @ftp.abort }.should raise_error(Net::FTPProtoError)
end
it "raises a Net::FTPProtoError when the response code is 502" do
@server.should_receive(:abor).and_respond("502 Command not implemented.")
- lambda { @ftp.abort }.should raise_error(Net::FTPProtoError)
+ -> { @ftp.abort }.should raise_error(Net::FTPProtoError)
end
it "raises a Net::FTPProtoError when the response code is 421" do
@server.should_receive(:abor).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.abort }.should raise_error(Net::FTPProtoError)
+ -> { @ftp.abort }.should raise_error(Net::FTPProtoError)
end
end
diff --git a/spec/ruby/library/net/ftp/acct_spec.rb b/spec/ruby/library/net/ftp/acct_spec.rb
index 3db51fca0f..d8068dc81e 100644
--- a/spec/ruby/library/net/ftp/acct_spec.rb
+++ b/spec/ruby/library/net/ftp/acct_spec.rb
@@ -28,31 +28,31 @@ describe "Net::FTP#acct" do
it "does not raise any error when the response code is 230" do
@server.should_receive(:acct).and_respond("230 User logged in, proceed.")
- lambda { @ftp.acct("my_account") }.should_not raise_error
+ -> { @ftp.acct("my_account") }.should_not raise_error
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:acct).and_respond("530 Not logged in.")
- lambda { @ftp.acct("my_account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.acct("my_account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:acct).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.acct("my_account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.acct("my_account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:acct).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.acct("my_account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.acct("my_account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 503" do
@server.should_receive(:acct).and_respond("503 Bad sequence of commands.")
- lambda { @ftp.acct("my_account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.acct("my_account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:acct).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.acct("my_account") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.acct("my_account") }.should raise_error(Net::FTPTempError)
end
end
diff --git a/spec/ruby/library/net/ftp/chdir_spec.rb b/spec/ruby/library/net/ftp/chdir_spec.rb
index 1f558c47e8..4c10fa78b4 100644
--- a/spec/ruby/library/net/ftp/chdir_spec.rb
+++ b/spec/ruby/library/net/ftp/chdir_spec.rb
@@ -29,32 +29,32 @@ describe "Net::FTP#chdir" do
it "does not raise a Net::FTPPermError when the response code is 500" do
@server.should_receive(:cdup).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.chdir("..") }.should_not raise_error(Net::FTPPermError)
+ -> { @ftp.chdir("..") }.should_not raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:cdup).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.chdir("..") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.chdir("..") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:cdup).and_respond("502 Command not implemented.")
- lambda { @ftp.chdir("..") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.chdir("..") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:cdup).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.chdir("..") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.chdir("..") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:cdup).and_respond("530 Not logged in.")
- lambda { @ftp.chdir("..") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.chdir("..") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 550" do
@server.should_receive(:cdup).and_respond("550 Requested action not taken.")
- lambda { @ftp.chdir("..") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.chdir("..") }.should raise_error(Net::FTPPermError)
end
end
@@ -69,31 +69,31 @@ describe "Net::FTP#chdir" do
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:cwd).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.chdir("test") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.chdir("test") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:cwd).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.chdir("test") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.chdir("test") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:cwd).and_respond("502 Command not implemented.")
- lambda { @ftp.chdir("test") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.chdir("test") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:cwd).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.chdir("test") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.chdir("test") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:cwd).and_respond("530 Not logged in.")
- lambda { @ftp.chdir("test") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.chdir("test") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 550" do
@server.should_receive(:cwd).and_respond("550 Requested action not taken.")
- lambda { @ftp.chdir("test") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.chdir("test") }.should raise_error(Net::FTPPermError)
end
end
diff --git a/spec/ruby/library/net/ftp/connect_spec.rb b/spec/ruby/library/net/ftp/connect_spec.rb
index 981751233e..9ee9bcd2c6 100644
--- a/spec/ruby/library/net/ftp/connect_spec.rb
+++ b/spec/ruby/library/net/ftp/connect_spec.rb
@@ -19,7 +19,7 @@ describe "Net::FTP#connect" do
end
it "tries to connect to the FTP Server on the given host and port" do
- lambda { @ftp.connect(@server.hostname, @server.server_port) }.should_not raise_error
+ -> { @ftp.connect(@server.hostname, @server.server_port) }.should_not raise_error
end
it "returns nil" do
@@ -28,22 +28,22 @@ describe "Net::FTP#connect" do
it "prints a small debug line when in debug mode" do
@ftp.debug_mode = true
- lambda { @ftp.connect(@server.hostname, @server.server_port) }.should output(/#{"connect: "}#{@server.hostname}#{", "}#{@server.server_port}#{"\\nget: 220 Dummy FTP Server ready!"}/)
+ -> { @ftp.connect(@server.hostname, @server.server_port) }.should output(/#{"connect: "}#{@server.hostname}#{", "}#{@server.server_port}#{"\\nget: 220 Dummy FTP Server ready!"}/)
@ftp.debug_mode = false
end
it "does not raise any error when the response code is 220" do
@server.connect_message = "220 Dummy FTP Server ready!"
- lambda { @ftp.connect(@server.hostname, @server.server_port) }.should_not raise_error
+ -> { @ftp.connect(@server.hostname, @server.server_port) }.should_not raise_error
end
it "raises a Net::FTPReplyError when the response code is 120" do
@server.connect_message = "120 Service ready in nnn minutes."
- lambda { @ftp.connect(@server.hostname, @server.server_port) }.should raise_error(Net::FTPReplyError)
+ -> { @ftp.connect(@server.hostname, @server.server_port) }.should raise_error(Net::FTPReplyError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.connect_message = "421 Service not available, closing control connection."
- lambda { @ftp.connect(@server.hostname, @server.server_port) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.connect(@server.hostname, @server.server_port) }.should raise_error(Net::FTPTempError)
end
end
diff --git a/spec/ruby/library/net/ftp/delete_spec.rb b/spec/ruby/library/net/ftp/delete_spec.rb
index fa0eddb312..cf8f9332e2 100644
--- a/spec/ruby/library/net/ftp/delete_spec.rb
+++ b/spec/ruby/library/net/ftp/delete_spec.rb
@@ -24,36 +24,36 @@ describe "Net::FTP#delete" do
it "raises a Net::FTPTempError when the response code is 450" do
@server.should_receive(:dele).and_respond("450 Requested file action not taken.")
- lambda { @ftp.delete("test.file") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.delete("test.file") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 550" do
@server.should_receive(:dele).and_respond("550 Requested action not taken.")
- lambda { @ftp.delete("test.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.delete("test.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:dele).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.delete("test.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.delete("test.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:dele).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.delete("test.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.delete("test.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:dele).and_respond("502 Command not implemented.")
- lambda { @ftp.delete("test.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.delete("test.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:dele).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.delete("test.file") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.delete("test.file") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:dele).and_respond("530 Not logged in.")
- lambda { @ftp.delete("test.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.delete("test.file") }.should raise_error(Net::FTPPermError)
end
end
diff --git a/spec/ruby/library/net/ftp/fixtures/server.rb b/spec/ruby/library/net/ftp/fixtures/server.rb
index 65339cfaf9..d4795a5c58 100644
--- a/spec/ruby/library/net/ftp/fixtures/server.rb
+++ b/spec/ruby/library/net/ftp/fixtures/server.rb
@@ -86,7 +86,7 @@ module NetFTPSpecs
end
def and_respond(text)
- @handlers[@handler_for] = lambda { |s, *args| s.response(text) }
+ @handlers[@handler_for] = -> s, *args { s.response(text) }
end
##
diff --git a/spec/ruby/library/net/ftp/help_spec.rb b/spec/ruby/library/net/ftp/help_spec.rb
index c7a089a588..d2e9fe7ee8 100644
--- a/spec/ruby/library/net/ftp/help_spec.rb
+++ b/spec/ruby/library/net/ftp/help_spec.rb
@@ -36,31 +36,31 @@ describe "Net::FTP#help" do
it "does not raise any error when the response code is 211" do
@server.should_receive(:help).and_respond("211 System status, or system help reply.")
- lambda { @ftp.help }.should_not raise_error
+ -> { @ftp.help }.should_not raise_error
end
it "does not raise any error when the response code is 214" do
@server.should_receive(:help).and_respond("214 Help message.")
- lambda { @ftp.help }.should_not raise_error
+ -> { @ftp.help }.should_not raise_error
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:help).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.help }.should raise_error(Net::FTPPermError)
+ -> { @ftp.help }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:help).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.help }.should raise_error(Net::FTPPermError)
+ -> { @ftp.help }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:help).and_respond("502 Command not implemented.")
- lambda { @ftp.help }.should raise_error(Net::FTPPermError)
+ -> { @ftp.help }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:help).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.help }.should raise_error(Net::FTPTempError)
+ -> { @ftp.help }.should raise_error(Net::FTPTempError)
end
end
diff --git a/spec/ruby/library/net/ftp/login_spec.rb b/spec/ruby/library/net/ftp/login_spec.rb
index c4f14f8747..46736851ee 100644
--- a/spec/ruby/library/net/ftp/login_spec.rb
+++ b/spec/ruby/library/net/ftp/login_spec.rb
@@ -32,7 +32,7 @@ describe "Net::FTP#login" do
it "raises a Net::FTPReplyError when the server requests an account" do
@server.should_receive(:user).and_respond("331 User name okay, need password.")
@server.should_receive(:pass).and_respond("332 Need account for login.")
- lambda { @ftp.login }.should raise_error(Net::FTPReplyError)
+ -> { @ftp.login }.should raise_error(Net::FTPReplyError)
end
end
@@ -44,13 +44,13 @@ describe "Net::FTP#login" do
it "raises a Net::FTPReplyError when the server requests a password, but none was given" do
@server.should_receive(:user).and_respond("331 User name okay, need password.")
- lambda { @ftp.login("rubyspec") }.should raise_error(Net::FTPReplyError)
+ -> { @ftp.login("rubyspec") }.should raise_error(Net::FTPReplyError)
end
it "raises a Net::FTPReplyError when the server requests an account, but none was given" do
@server.should_receive(:user).and_respond("331 User name okay, need password.")
@server.should_receive(:pass).and_respond("332 Need account for login.")
- lambda { @ftp.login("rubyspec") }.should raise_error(Net::FTPReplyError)
+ -> { @ftp.login("rubyspec") }.should raise_error(Net::FTPReplyError)
end
end
@@ -69,7 +69,7 @@ describe "Net::FTP#login" do
it "raises a Net::FTPReplyError when the server requests an account" do
@server.should_receive(:user).and_respond("331 User name okay, need password.")
@server.should_receive(:pass).and_respond("332 Need account for login.")
- lambda { @ftp.login("rubyspec", "rocks") }.should raise_error(Net::FTPReplyError)
+ -> { @ftp.login("rubyspec", "rocks") }.should raise_error(Net::FTPReplyError)
end
end
@@ -96,27 +96,27 @@ describe "Net::FTP#login" do
describe "when the USER command fails" do
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:user).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:user).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:user).and_respond("502 Command not implemented.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:user).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:user).and_respond("530 Not logged in.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
end
@@ -127,32 +127,32 @@ describe "Net::FTP#login" do
it "does not raise an Error when the response code is 202" do
@server.should_receive(:pass).and_respond("202 Command not implemented, superfluous at this site.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should_not raise_error
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should_not raise_error
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:pass).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:pass).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:pass).and_respond("502 Command not implemented.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:pass).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:pass).and_respond("530 Not logged in.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
end
@@ -164,32 +164,32 @@ describe "Net::FTP#login" do
it "does not raise an Error when the response code is 202" do
@server.should_receive(:acct).and_respond("202 Command not implemented, superfluous at this site.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should_not raise_error
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should_not raise_error
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:acct).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:acct).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:acct).and_respond("502 Command not implemented.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:acct).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:acct).and_respond("530 Not logged in.")
- lambda { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.login("rubyspec", "rocks", "account") }.should raise_error(Net::FTPPermError)
end
end
end
diff --git a/spec/ruby/library/net/ftp/mdtm_spec.rb b/spec/ruby/library/net/ftp/mdtm_spec.rb
index ddcc06d708..b74cf8d3c7 100644
--- a/spec/ruby/library/net/ftp/mdtm_spec.rb
+++ b/spec/ruby/library/net/ftp/mdtm_spec.rb
@@ -28,11 +28,11 @@ describe "Net::FTP#mdtm" do
it "raises a Net::FTPPermError when the response code is 550" do
@server.should_receive(:mdtm).and_respond("550 Requested action not taken.")
- lambda { @ftp.mdtm("test.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.mdtm("test.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:mdtm).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.mdtm("test.file") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.mdtm("test.file") }.should raise_error(Net::FTPTempError)
end
end
diff --git a/spec/ruby/library/net/ftp/mkdir_spec.rb b/spec/ruby/library/net/ftp/mkdir_spec.rb
index 0d8314bfa3..7dc45b5711 100644
--- a/spec/ruby/library/net/ftp/mkdir_spec.rb
+++ b/spec/ruby/library/net/ftp/mkdir_spec.rb
@@ -31,31 +31,31 @@ describe "Net::FTP#mkdir" do
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:mkd).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:mkd).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:mkd).and_respond("502 Command not implemented.")
- lambda { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:mkd).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:mkd).and_respond("530 Not logged in.")
- lambda { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 550" do
@server.should_receive(:mkd).and_respond("550 Requested action not taken.")
- lambda { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.mkdir("test.folder") }.should raise_error(Net::FTPPermError)
end
end
diff --git a/spec/ruby/library/net/ftp/mtime_spec.rb b/spec/ruby/library/net/ftp/mtime_spec.rb
index e05e92f58f..0f6cc1ba20 100644
--- a/spec/ruby/library/net/ftp/mtime_spec.rb
+++ b/spec/ruby/library/net/ftp/mtime_spec.rb
@@ -40,11 +40,11 @@ describe "Net::FTP#mtime" do
it "raises a Net::FTPPermError when the response code is 550" do
@server.should_receive(:mdtm).and_respond("550 Requested action not taken.")
- lambda { @ftp.mtime("test.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.mtime("test.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:mdtm).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.mtime("test.file") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.mtime("test.file") }.should raise_error(Net::FTPTempError)
end
end
diff --git a/spec/ruby/library/net/ftp/nlst_spec.rb b/spec/ruby/library/net/ftp/nlst_spec.rb
index 36ca7a6127..34384fb8c4 100644
--- a/spec/ruby/library/net/ftp/nlst_spec.rb
+++ b/spec/ruby/library/net/ftp/nlst_spec.rb
@@ -35,32 +35,32 @@ describe "Net::FTP#nlst" do
describe "when the NLST command fails" do
it "raises a Net::FTPTempError when the response code is 450" do
@server.should_receive(:nlst).and_respond("450 Requested file action not taken..")
- lambda { @ftp.nlst }.should raise_error(Net::FTPTempError)
+ -> { @ftp.nlst }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:nlst).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.nlst }.should raise_error(Net::FTPPermError)
+ -> { @ftp.nlst }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:nlst).and_respond("501 Syntax error, command unrecognized.")
- lambda { @ftp.nlst }.should raise_error(Net::FTPPermError)
+ -> { @ftp.nlst }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:nlst).and_respond("502 Command not implemented.")
- lambda { @ftp.nlst }.should raise_error(Net::FTPPermError)
+ -> { @ftp.nlst }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:nlst).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.nlst }.should raise_error(Net::FTPTempError)
+ -> { @ftp.nlst }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:nlst).and_respond("530 Not logged in.")
- lambda { @ftp.nlst }.should raise_error(Net::FTPPermError)
+ -> { @ftp.nlst }.should raise_error(Net::FTPPermError)
end
end
@@ -68,25 +68,25 @@ describe "Net::FTP#nlst" 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.nlst }.should raise_error(Net::FTPPermError)
+ -> { @ftp.nlst }.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.nlst }.should raise_error(Net::FTPPermError)
+ -> { @ftp.nlst }.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.nlst }.should raise_error(Net::FTPTempError)
+ -> { @ftp.nlst }.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.nlst }.should raise_error(Net::FTPPermError)
+ -> { @ftp.nlst }.should raise_error(Net::FTPPermError)
end
end
end
diff --git a/spec/ruby/library/net/ftp/noop_spec.rb b/spec/ruby/library/net/ftp/noop_spec.rb
index eca8911b7b..070750ced7 100644
--- a/spec/ruby/library/net/ftp/noop_spec.rb
+++ b/spec/ruby/library/net/ftp/noop_spec.rb
@@ -28,11 +28,11 @@ describe "Net::FTP#noop" do
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:noop).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.noop }.should raise_error(Net::FTPPermError)
+ -> { @ftp.noop }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:noop).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.noop }.should raise_error(Net::FTPTempError)
+ -> { @ftp.noop }.should raise_error(Net::FTPTempError)
end
end
diff --git a/spec/ruby/library/net/ftp/pwd_spec.rb b/spec/ruby/library/net/ftp/pwd_spec.rb
index f515cd29a0..a3998cc730 100644
--- a/spec/ruby/library/net/ftp/pwd_spec.rb
+++ b/spec/ruby/library/net/ftp/pwd_spec.rb
@@ -28,26 +28,26 @@ describe "Net::FTP#pwd" do
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:pwd).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.pwd }.should raise_error(Net::FTPPermError)
+ -> { @ftp.pwd }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:pwd).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.pwd }.should raise_error(Net::FTPPermError)
+ -> { @ftp.pwd }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:pwd).and_respond("502 Command not implemented.")
- lambda { @ftp.pwd }.should raise_error(Net::FTPPermError)
+ -> { @ftp.pwd }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:pwd).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.pwd }.should raise_error(Net::FTPTempError)
+ -> { @ftp.pwd }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 550" do
@server.should_receive(:pwd).and_respond("550 Requested action not taken.")
- lambda { @ftp.pwd }.should raise_error(Net::FTPPermError)
+ -> { @ftp.pwd }.should raise_error(Net::FTPPermError)
end
end
diff --git a/spec/ruby/library/net/ftp/rename_spec.rb b/spec/ruby/library/net/ftp/rename_spec.rb
index e1fd4e47cf..376b203ac9 100644
--- a/spec/ruby/library/net/ftp/rename_spec.rb
+++ b/spec/ruby/library/net/ftp/rename_spec.rb
@@ -31,64 +31,64 @@ describe "Net::FTP#rename" do
describe "when the RNFR command fails" do
it "raises a Net::FTPTempError when the response code is 450" do
@server.should_receive(:rnfr).and_respond("450 Requested file action not taken.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 550" do
@server.should_receive(:rnfr).and_respond("550 Requested action not taken.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:rnfr).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:rnfr).and_respond("502 Command not implemented.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:rnfr).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:rnfr).and_respond("530 Not logged in.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
end
end
describe "when the RNTO command fails" do
it "raises a Net::FTPPermError when the response code is 532" do
@server.should_receive(:rnfr).and_respond("532 Need account for storing files.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 553" do
@server.should_receive(:rnto).and_respond("553 Requested action not taken.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:rnto).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:rnto).and_respond("502 Command not implemented.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:rnto).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:rnto).and_respond("530 Not logged in.")
- lambda { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rename("from.file", "to.file") }.should raise_error(Net::FTPPermError)
end
end
end
diff --git a/spec/ruby/library/net/ftp/return_code_spec.rb b/spec/ruby/library/net/ftp/return_code_spec.rb
index 605f66ec6e..e4b98c8031 100644
--- a/spec/ruby/library/net/ftp/return_code_spec.rb
+++ b/spec/ruby/library/net/ftp/return_code_spec.rb
@@ -7,7 +7,7 @@ describe "Net::FTP#return_code" do
end
it "outputs a warning and returns a newline" do
- lambda do
+ -> do
@ftp.return_code.should == "\n"
end.should complain(/warning: Net::FTP#return_code is obsolete and do nothing/)
end
@@ -19,6 +19,6 @@ describe "Net::FTP#return_code=" do
end
it "outputs a warning" do
- lambda { @ftp.return_code = 123 }.should complain(/warning: Net::FTP#return_code= is obsolete and do nothing/)
+ -> { @ftp.return_code = 123 }.should complain(/warning: Net::FTP#return_code= is obsolete and do nothing/)
end
end
diff --git a/spec/ruby/library/net/ftp/rmdir_spec.rb b/spec/ruby/library/net/ftp/rmdir_spec.rb
index ab92a8678b..0515897998 100644
--- a/spec/ruby/library/net/ftp/rmdir_spec.rb
+++ b/spec/ruby/library/net/ftp/rmdir_spec.rb
@@ -28,31 +28,31 @@ describe "Net::FTP#rmdir" do
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:rmd).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:rmd).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:rmd).and_respond("502 Command not implemented.")
- lambda { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:rmd).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:rmd).and_respond("530 Not logged in.")
- lambda { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 550" do
@server.should_receive(:rmd).and_respond("550 Requested action not taken.")
- lambda { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.rmdir("test.folder") }.should raise_error(Net::FTPPermError)
end
end
diff --git a/spec/ruby/library/net/ftp/sendcmd_spec.rb b/spec/ruby/library/net/ftp/sendcmd_spec.rb
index 631bc10c84..dafa36e032 100644
--- a/spec/ruby/library/net/ftp/sendcmd_spec.rb
+++ b/spec/ruby/library/net/ftp/sendcmd_spec.rb
@@ -28,27 +28,27 @@ describe "Net::FTP#sendcmd" do
it "raises no error when the response code is 1xx, 2xx or 3xx" do
@server.should_receive(:help).and_respond("120 Service ready in nnn minutes.")
- lambda { @ftp.sendcmd("HELP") }.should_not raise_error
+ -> { @ftp.sendcmd("HELP") }.should_not raise_error
@server.should_receive(:help).and_respond("200 Command okay.")
- lambda { @ftp.sendcmd("HELP") }.should_not raise_error
+ -> { @ftp.sendcmd("HELP") }.should_not raise_error
@server.should_receive(:help).and_respond("350 Requested file action pending further information.")
- lambda { @ftp.sendcmd("HELP") }.should_not raise_error
+ -> { @ftp.sendcmd("HELP") }.should_not raise_error
end
it "raises a Net::FTPTempError when the response code is 4xx" do
@server.should_receive(:help).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.sendcmd("HELP") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.sendcmd("HELP") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 5xx" do
@server.should_receive(:help).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.sendcmd("HELP") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.sendcmd("HELP") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPProtoError when the response code is not between 1xx-5xx" do
@server.should_receive(:help).and_respond("999 Invalid response.")
- lambda { @ftp.sendcmd("HELP") }.should raise_error(Net::FTPProtoError)
+ -> { @ftp.sendcmd("HELP") }.should raise_error(Net::FTPProtoError)
end
end
diff --git a/spec/ruby/library/net/ftp/shared/getbinaryfile.rb b/spec/ruby/library/net/ftp/shared/getbinaryfile.rb
index 2252935b2d..f324f5b85d 100644
--- a/spec/ruby/library/net/ftp/shared/getbinaryfile.rb
+++ b/spec/ruby/library/net/ftp/shared/getbinaryfile.rb
@@ -60,32 +60,32 @@ describe :net_ftp_getbinaryfile, shared: :true do
describe "and the REST command fails" do
it "raises a Net::FTPProtoError when the response code is 550" do
@server.should_receive(:rest).and_respond("Requested action not taken.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPProtoError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPProtoError)
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:rest).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:rest).and_respond("501 Syntax error, command unrecognized.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:rest).and_respond("502 Command not implemented.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:rest).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:rest).and_respond("530 Not logged in.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
end
end
@@ -93,32 +93,32 @@ describe :net_ftp_getbinaryfile, shared: :true do
describe "when the RETR command fails" do
it "raises a Net::FTPTempError when the response code is 450" do
@server.should_receive(:retr).and_respond("450 Requested file action not taken.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPProtoError when the response code is 550" do
@server.should_receive(:retr).and_respond("Requested action not taken.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPProtoError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPProtoError)
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:retr).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:retr).and_respond("501 Syntax error, command unrecognized.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:retr).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:retr).and_respond("530 Not logged in.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
end
@@ -126,25 +126,25 @@ describe :net_ftp_getbinaryfile, 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, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.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, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.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, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.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, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
end
end
diff --git a/spec/ruby/library/net/ftp/shared/gettextfile.rb b/spec/ruby/library/net/ftp/shared/gettextfile.rb
index 6219581d12..82bec2a4a7 100644
--- a/spec/ruby/library/net/ftp/shared/gettextfile.rb
+++ b/spec/ruby/library/net/ftp/shared/gettextfile.rb
@@ -43,32 +43,32 @@ describe :net_ftp_gettextfile, shared: :true do
describe "when the RETR command fails" do
it "raises a Net::FTPTempError when the response code is 450" do
@server.should_receive(:retr).and_respond("450 Requested file action not taken.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPProtoError when the response code is 550" do
@server.should_receive(:retr).and_respond("Requested action not taken.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPProtoError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPProtoError)
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:retr).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:retr).and_respond("501 Syntax error, command unrecognized.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:retr).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:retr).and_respond("530 Not logged in.")
- lambda { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
end
@@ -76,25 +76,25 @@ describe :net_ftp_gettextfile, 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, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.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, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.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, "test", @tmp_file) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.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, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, "test", @tmp_file) }.should raise_error(Net::FTPPermError)
end
end
end
diff --git a/spec/ruby/library/net/ftp/shared/list.rb b/spec/ruby/library/net/ftp/shared/list.rb
index 50ca8ad119..adc3fa59c1 100644
--- a/spec/ruby/library/net/ftp/shared/list.rb
+++ b/spec/ruby/library/net/ftp/shared/list.rb
@@ -47,32 +47,32 @@ describe :net_ftp_list, shared: true do
describe "when the LIST command fails" do
it "raises a Net::FTPTempError when the response code is 450" do
@server.should_receive(:list).and_respond("450 Requested file action not taken..")
- lambda { @ftp.send(@method) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method) }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:list).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.send(@method) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method) }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:list).and_respond("501 Syntax error, command unrecognized.")
- lambda { @ftp.send(@method) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method) }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:list).and_respond("502 Command not implemented.")
- lambda { @ftp.send(@method) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method) }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:list).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.send(@method) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method) }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:list).and_respond("530 Not logged in.")
- lambda { @ftp.send(@method) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method) }.should raise_error(Net::FTPPermError)
end
end
@@ -80,25 +80,25 @@ describe :net_ftp_list, 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) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method) }.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) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method) }.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) }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method) }.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) }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method) }.should raise_error(Net::FTPPermError)
end
end
end
diff --git a/spec/ruby/library/net/ftp/shared/putbinaryfile.rb b/spec/ruby/library/net/ftp/shared/putbinaryfile.rb
index 74eaf320ae..1163a1cfea 100644
--- a/spec/ruby/library/net/ftp/shared/putbinaryfile.rb
+++ b/spec/ruby/library/net/ftp/shared/putbinaryfile.rb
@@ -67,32 +67,32 @@ describe :net_ftp_putbinaryfile, shared: :true do
describe "and the APPE command fails" do
it "raises a Net::FTPProtoError when the response code is 550" do
@server.should_receive(:appe).and_respond("Requested action not taken.")
- lambda { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPProtoError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPProtoError)
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:appe).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:appe).and_respond("501 Syntax error, command unrecognized.")
- lambda { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:appe).and_respond("502 Command not implemented.")
- lambda { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:appe).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:appe).and_respond("530 Not logged in.")
- lambda { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPPermError)
end
end
end
@@ -100,42 +100,42 @@ describe :net_ftp_putbinaryfile, 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, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.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, "binary") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.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, "binary") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.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, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.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, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.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, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.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, "binary") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.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, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPPermError)
end
end
@@ -143,25 +143,25 @@ describe :net_ftp_putbinaryfile, 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, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.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, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.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, "binary") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.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, "binary") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.send(@method, @local_fixture_file, "binary") }.should raise_error(Net::FTPPermError)
end
end
end
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
diff --git a/spec/ruby/library/net/ftp/site_spec.rb b/spec/ruby/library/net/ftp/site_spec.rb
index 85aa2609c1..4d6a9b4a0c 100644
--- a/spec/ruby/library/net/ftp/site_spec.rb
+++ b/spec/ruby/library/net/ftp/site_spec.rb
@@ -28,26 +28,26 @@ describe "Net::FTP#site" do
it "does not raise an error when the response code is 202" do
@server.should_receive(:site).and_respond("202 Command not implemented, superfluous at this site.")
- lambda { @ftp.site("param") }.should_not raise_error
+ -> { @ftp.site("param") }.should_not raise_error
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:site).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.site("param") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.site("param") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:site).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.site("param") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.site("param") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:site).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.site("param") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.site("param") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:site).and_respond("530 Requested action not taken.")
- lambda { @ftp.site("param") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.site("param") }.should raise_error(Net::FTPPermError)
end
end
diff --git a/spec/ruby/library/net/ftp/size_spec.rb b/spec/ruby/library/net/ftp/size_spec.rb
index eb3ee90d0f..17615079e9 100644
--- a/spec/ruby/library/net/ftp/size_spec.rb
+++ b/spec/ruby/library/net/ftp/size_spec.rb
@@ -28,21 +28,21 @@ describe "Net::FTP#size" do
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:size).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.size("test.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.size("test.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:size).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.size("test.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.size("test.file") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:size).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.size("test.file") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.size("test.file") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 550" do
@server.should_receive(:size).and_respond("550 Requested action not taken.")
- lambda { @ftp.size("test.file") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.size("test.file") }.should raise_error(Net::FTPPermError)
end
end
diff --git a/spec/ruby/library/net/ftp/status_spec.rb b/spec/ruby/library/net/ftp/status_spec.rb
index c3874ea41e..6e3840bf93 100644
--- a/spec/ruby/library/net/ftp/status_spec.rb
+++ b/spec/ruby/library/net/ftp/status_spec.rb
@@ -32,36 +32,36 @@ describe "Net::FTP#status" do
it "does not raise an error when the response code is 212" do
@server.should_receive(:stat).and_respond("212 Directory status.")
- lambda { @ftp.status }.should_not raise_error
+ -> { @ftp.status }.should_not raise_error
end
it "does not raise an error when the response code is 213" do
@server.should_receive(:stat).and_respond("213 File status.")
- lambda { @ftp.status }.should_not raise_error
+ -> { @ftp.status }.should_not raise_error
end
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:stat).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.status }.should raise_error(Net::FTPPermError)
+ -> { @ftp.status }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:stat).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.status }.should raise_error(Net::FTPPermError)
+ -> { @ftp.status }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:stat).and_respond("502 Command not implemented.")
- lambda { @ftp.status }.should raise_error(Net::FTPPermError)
+ -> { @ftp.status }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:stat).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.status }.should raise_error(Net::FTPTempError)
+ -> { @ftp.status }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 530" do
@server.should_receive(:stat).and_respond("530 Requested action not taken.")
- lambda { @ftp.status }.should raise_error(Net::FTPPermError)
+ -> { @ftp.status }.should raise_error(Net::FTPPermError)
end
end
diff --git a/spec/ruby/library/net/ftp/system_spec.rb b/spec/ruby/library/net/ftp/system_spec.rb
index 73a5ddc72f..749258622d 100644
--- a/spec/ruby/library/net/ftp/system_spec.rb
+++ b/spec/ruby/library/net/ftp/system_spec.rb
@@ -28,21 +28,21 @@ describe "Net::FTP#system" do
it "raises a Net::FTPPermError when the response code is 500" do
@server.should_receive(:syst).and_respond("500 Syntax error, command unrecognized.")
- lambda { @ftp.system }.should raise_error(Net::FTPPermError)
+ -> { @ftp.system }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 501" do
@server.should_receive(:syst).and_respond("501 Syntax error in parameters or arguments.")
- lambda { @ftp.system }.should raise_error(Net::FTPPermError)
+ -> { @ftp.system }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPPermError when the response code is 502" do
@server.should_receive(:syst).and_respond("502 Command not implemented.")
- lambda { @ftp.system }.should raise_error(Net::FTPPermError)
+ -> { @ftp.system }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPTempError when the response code is 421" do
@server.should_receive(:syst).and_respond("421 Service not available, closing control connection.")
- lambda { @ftp.system }.should raise_error(Net::FTPTempError)
+ -> { @ftp.system }.should raise_error(Net::FTPTempError)
end
end
diff --git a/spec/ruby/library/net/ftp/voidcmd_spec.rb b/spec/ruby/library/net/ftp/voidcmd_spec.rb
index 5e82b70a78..3673c7fd5b 100644
--- a/spec/ruby/library/net/ftp/voidcmd_spec.rb
+++ b/spec/ruby/library/net/ftp/voidcmd_spec.rb
@@ -19,7 +19,7 @@ describe "Net::FTP#voidcmd" do
it "sends the passed command to the server" do
@server.should_receive(:help).and_respond("2xx Does not raise.")
- lambda { @ftp.voidcmd("HELP") }.should_not raise_error
+ -> { @ftp.voidcmd("HELP") }.should_not raise_error
end
it "returns nil" do
@@ -29,26 +29,26 @@ describe "Net::FTP#voidcmd" do
it "raises a Net::FTPReplyError when the response code is 1xx" do
@server.should_receive(:help).and_respond("1xx Does raise a Net::FTPReplyError.")
- lambda { @ftp.voidcmd("HELP") }.should raise_error(Net::FTPReplyError)
+ -> { @ftp.voidcmd("HELP") }.should raise_error(Net::FTPReplyError)
end
it "raises a Net::FTPReplyError when the response code is 3xx" do
@server.should_receive(:help).and_respond("3xx Does raise a Net::FTPReplyError.")
- lambda { @ftp.voidcmd("HELP") }.should raise_error(Net::FTPReplyError)
+ -> { @ftp.voidcmd("HELP") }.should raise_error(Net::FTPReplyError)
end
it "raises a Net::FTPTempError when the response code is 4xx" do
@server.should_receive(:help).and_respond("4xx Does raise a Net::FTPTempError.")
- lambda { @ftp.voidcmd("HELP") }.should raise_error(Net::FTPTempError)
+ -> { @ftp.voidcmd("HELP") }.should raise_error(Net::FTPTempError)
end
it "raises a Net::FTPPermError when the response code is 5xx" do
@server.should_receive(:help).and_respond("5xx Does raise a Net::FTPPermError.")
- lambda { @ftp.voidcmd("HELP") }.should raise_error(Net::FTPPermError)
+ -> { @ftp.voidcmd("HELP") }.should raise_error(Net::FTPPermError)
end
it "raises a Net::FTPProtoError when the response code is not valid" do
@server.should_receive(:help).and_respond("999 Does raise a Net::FTPProtoError.")
- lambda { @ftp.voidcmd("HELP") }.should raise_error(Net::FTPProtoError)
+ -> { @ftp.voidcmd("HELP") }.should raise_error(Net::FTPProtoError)
end
end