Sha256: 50798a3b3abc40856990d2e41254d221e2795734127351be8a7b3abc5c691ffd
Contents?: true
Size: 452 Bytes
Versions: 2
Compression:
Stored size: 452 Bytes
Contents
require 'net/ftp' describe "Net::FTP#closed?" do before(:each) do @socket = mock("Socket") @ftp = Net::FTP.new @ftp.instance_variable_set(:@sock, @socket) end it "returns true when the socket is closed" do @socket.should_receive(:closed?).and_return(true) @ftp.closed?.should be_true end it "returns true when the socket is nil" do @ftp.instance_variable_set(:@sock, nil) @ftp.closed?.should be_true end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubysl-net-ftp-2.0.1 | spec/closed_spec.rb |
rubysl-net-ftp-1.0.0 | spec/closed_spec.rb |