spec/network/ftp_spec.rb in ronin-support-0.5.0 vs spec/network/ftp_spec.rb in ronin-support-0.5.1

- old
+ new

@@ -24,9 +24,25 @@ ftp.should_not be_closed ftp.close end + describe ":passive" do + it "should set passive mode by default" do + ftp = subject.ftp_connect(host) + + ftp.passive.should be_true + ftp.close + end + + it "should allow disabling passive mode" do + ftp = subject.ftp_connect(host, :passive => false) + + ftp.passive.should be_false + ftp.close + end + end + context "when given a block" do it "should yield the new Net::FTP object" do ftp = subject.ftp_connect(host) do |ftp| ftp.should be_kind_of(Net::FTP) end