summaryrefslogtreecommitdiff
path: root/spec/ruby/library/net/ftp/binary_spec.rb
blob: 6f1a1ab8ba0955aa0e71b2f47d59a73cc49c3d87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require File.expand_path('../../../../spec_helper', __FILE__)
require File.expand_path('../spec_helper', __FILE__)

describe "Net::FTP#binary" do
  it "returns true when self is in binary mode" do
    ftp = Net::FTP.new
    ftp.binary.should be_true

    ftp.binary = false
    ftp.binary.should be_false
  end
end

describe "Net::FTP#binary=" do
  it "sets self to binary mode when passed true" do
    ftp = Net::FTP.new

    ftp.binary = true
    ftp.binary.should be_true

    ftp.binary = false
    ftp.binary.should be_false
  end
end