Sha256: 74d4024b2149dbe6c3ae2c1a5b5be6bd8036887f134440ff3177927bb48e6cb7

Contents?: true

Size: 752 Bytes

Versions: 11

Compression:

Stored size: 752 Bytes

Contents

require 'spec_helper'

describe 'Entry' do
  with_test_dir

  before do
    @path = test_dir['a/b/c']
  end

  it "name" do
    @path.name.should == 'c'
  end

  it "string integration" do
    '/'.to_entry.path.should == '/'
    'a'.to_entry.path.should == "./a"
  end

  it 'tmp' do
    tmp = test_dir.tmp
    tmp.should be_dir
    tmp.destroy

    tmp = nil
    test_dir.tmp do |path|
      tmp = path
      tmp.should be_dir
    end
    tmp.should_not exist
  end

  it 'should respond to local?' do
    test_dir.should respond_to(:local?)
  end

  it 'created_at, updated_at, size' do
    file = test_dir.file('file').write 'data'
    file.created_at.class.should == Time
    file.updated_at.class.should == Time
    file.size.should == 4
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
vfs-momolog-0.0.1 spec/entry_spec.rb
vfs-0.4.8 spec/entry_spec.rb
vfs-0.4.7 spec/entry_spec.rb
vfs-0.4.6 spec/entry_spec.rb
vfs-0.4.5 spec/entry_spec.rb
vfs-0.4.4 spec/entry_spec.rb
vfs-0.4.3 spec/entry_spec.rb
vfs-0.4.2 spec/entry_spec.rb
vfs-0.4.1 spec/entry_spec.rb
vfs-0.4.0 spec/entry_spec.rb
io-0.0.1 spec/entry_spec.rb