Sha256: 240a2e7617a45cecb666a31d2428c6e450e9107379eab18061213e6e49416cf4

Contents?: true

Size: 918 Bytes

Versions: 83

Compression:

Stored size: 918 Bytes

Contents

describe :file_exist, :shared => true do
  it "return true if the file exist" do
    @object.send(@method, File.join(__rhoGetCurrentDir(), __FILE__).gsub(/\.rb/,".iseq")).should == true
    @object.send(@method, 'a_fake_file').should == false
  end

  it "return true if the file exist using the alias exists?" do
    @object.send(@method, File.join(__rhoGetCurrentDir(), __FILE__).gsub(/\.rb/,".iseq")).should == true
    @object.send(@method, 'a_fake_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, File.join(__rhoGetCurrentDir(), __FILE__), File.join(__rhoGetCurrentDir(), __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

83 entries across 83 versions & 1 rubygems

Version Path
rhodes-3.1.1 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.1.1.beta spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.1.0 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.1.0.beta.5 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.1.0.beta.4 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.1.0.beta.3 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.1.0.beta.2 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.1.0.beta.1 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.2 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.2.beta.1 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.1 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.1.beta.8 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.1.beta.7 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.1.beta.6 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.1.beta.5 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.1.beta.4 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.1.beta.3 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.1.beta.2 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.0 spec/framework_spec/app/spec/shared/file/exist.rb
rhodes-3.0.0.beta.7 spec/framework_spec/app/spec/shared/file/exist.rb