Sha256: 3b5784451e849c8b0a0fb225ebd092576cd794c9d95e57a3f1ec8fcbb1edd6bf

Contents?: true

Size: 669 Bytes

Versions: 12

Compression:

Stored size: 669 Bytes

Contents

require 'spec/spec_helper'
require 'lib/stowaway/file'

describe Stowaway::FileObj do
  
  before(:all) do
    @file = Stowaway::FileObj.new('/fake/path/test.rb')
  end
  
  it "should return full path" do
    @file.fullpath.should == '/fake/path/test.rb'
  end
  
  it "should return name of file" do
    @file.name.should == 'test.rb'
  end
  
  it "should return path to file" do
    @file.path.should == '/fake/path'
  end
  
  it "should be == if paths are the same" do
    @file.should == Stowaway::FileObj.new('/fake/path/test.rb')
  end
  
  it "should not be == if paths are differet" do
    @file.should_not == Stowaway::FileObj.new('/blah/test.rb')
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
stowaway-0.2.2 spec/lib/file_spec.rb
stowaway-0.2.0 spec/lib/file_spec.rb
stowaway-0.1.10 spec/lib/file_spec.rb
stowaway-0.1.9 spec/lib/file_spec.rb
stowaway-0.1.8 spec/lib/file_spec.rb
stowaway-0.1.6 spec/lib/file_spec.rb
stowaway-0.1.5 spec/lib/file_spec.rb
stowaway-0.1.2 spec/lib/file_spec.rb
stowaway-0.1.1 spec/lib/file_spec.rb
stowaway-0.0.6 spec/lib/file_spec.rb
stowaway-0.0.4 spec/lib/file_spec.rb
stowaway-0.0.1 spec/lib/file_spec.rb