Sha256: afc1540ca895b34787ac96ca39185073d8e7a625cab8e4991e0e150cfe3fd706

Contents?: true

Size: 834 Bytes

Versions: 52

Compression:

Stored size: 834 Bytes

Contents

describe :file_directory, :shared => true do
  before :each do
    platform_is :windows do
      @dir  = "C:\\"
      @file = "C:\\winnt\\notepad.exe"
    end

    platform_is_not :windows do
      @dir  = "/"
      @file = "/bin/ls"
    end
  end

  after :each do
    @dir = nil
  end

  it "return true if dir is a directory, otherwise return false" do
    @object.send(@method, @dir).should == true
    @object.send(@method, @file).should == false
  end

  it "raises an ArgumentError if not passed one argument" do
    lambda { @object.send(@method)              }.should raise_error(ArgumentError)
    lambda { @object.send(@method, @dir, @file) }.should raise_error(ArgumentError)
  end

  it "raises a TypeError if not passed a String type" do
    lambda { @object.send(@method, nil) }.should raise_error(TypeError)
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
rhodes-2.3.2 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.3.2.beta.2 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.3.2.beta.1 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.3.1 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.3.1.beta.1 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.3.0 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.3.0.beta.3 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.3.0.beta.2 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.3.0.beta.1 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.6 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.6.beta.1 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.5 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.5.beta.3 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.5.beta.2 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.5.beta.1 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.4.beta.1 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.3 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.3.beta.1 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.2 spec/framework_spec/app/spec/shared/file/directory.rb
rhodes-2.2.2.beta.1 spec/framework_spec/app/spec/shared/file/directory.rb