summaryrefslogtreecommitdiff
path: root/spec/ruby/library/net-ftp/return_code_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/net-ftp/return_code_spec.rb')
-rw-r--r--spec/ruby/library/net-ftp/return_code_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/ruby/library/net-ftp/return_code_spec.rb b/spec/ruby/library/net-ftp/return_code_spec.rb
new file mode 100644
index 0000000000..35a6232f7e
--- /dev/null
+++ b/spec/ruby/library/net-ftp/return_code_spec.rb
@@ -0,0 +1,24 @@
+require_relative '../../spec_helper'
+require_relative 'spec_helper'
+
+describe "Net::FTP#return_code" do
+ before :each do
+ @ftp = Net::FTP.new
+ end
+
+ it "outputs a warning and returns a newline" do
+ -> do
+ @ftp.return_code.should == "\n"
+ end.should complain(/warning: Net::FTP#return_code is obsolete and do nothing/)
+ end
+end
+
+describe "Net::FTP#return_code=" do
+ before :each do
+ @ftp = Net::FTP.new
+ end
+
+ it "outputs a warning" do
+ -> { @ftp.return_code = 123 }.should complain(/warning: Net::FTP#return_code= is obsolete and do nothing/)
+ end
+end