summaryrefslogtreecommitdiff
path: root/spec/ruby/library/net/ftp/binary_spec.rb
blob: 60e312a673fc9bccdff33d8754111591282a03a2 (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_relative '../../../spec_helper'
require_relative 'spec_helper'

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