Sha256: fe7937d906e9b38d3e747d653ecb22ce074e61c82495ea4c2ebe55383f88a555

Contents?: true

Size: 746 Bytes

Versions: 1

Compression:

Stored size: 746 Bytes

Contents

require 'spec_helper'

describe 'Entry' do
  with_test_fs

  before do
    @path = test_fs['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_fs.tmp
    tmp.should be_dir
    tmp.destroy

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

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

  it 'created_at, updated_at, size' do
    file = test_fs.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

1 entries across 1 versions & 1 rubygems

Version Path
vfs-0.3.15 spec/entry_spec.rb