Sha256: c9f9c134fc3b42a02c40953d76d4e8f8563ae888afde496b7f740a4665e880f9

Contents?: true

Size: 859 Bytes

Versions: 13

Compression:

Stored size: 859 Bytes

Contents

require 'spec_helper'

describe 'UniversalEntry' do
  before do
    @fs = '/'.to_entry_on(Vfs::Storages::HashFs.new)
    @path = @fs['/a/b/c']
  end
  
  describe 'existence' do
    it "should check both files and dirs" do
      @path.should_not exist
      @path.dir.create
      @path.should be_dir      
      @path.should exist
      
      @path.file.create!
      @path.should be_file
      @path.should exist
    end
  end
  
  describe 'destroying' do
    it "should destroy both files and dirs" do
      @path.dir.create
      @path.should be_dir
      @path.destroy
      @path.should_not exist      
      
      @path.file.create
      @path.should be_file
      @path.destroy
      @path.should_not exist
    end
    
    it "shouldn't raise if file not exist" do
      @path.destroy
    end
  end
  
  describe 'copy_to'
  describe 'move_to'
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vfs-0.3.10 spec/universal_entry_spec.rb
vfs-0.3.9 spec/universal_entry_spec.rb
vfs-0.3.8 spec/universal_entry_spec.rb
vfs-0.3.7 spec/universal_entry_spec.rb
vfs-0.3.6 spec/universal_entry_spec.rb
vfs-0.3.5 spec/universal_entry_spec.rb
vfs-0.3.4 spec/universal_entry_spec.rb
vfs-0.3.3 spec/universal_entry_spec.rb
vfs-0.3.2 spec/universal_entry_spec.rb
vfs-0.3.1 spec/universal_entry_spec.rb
vfs-0.3 spec/universal_entry_spec.rb
vfs-0.2.1 spec/universal_entry_spec.rb
vfs-0.2 spec/universal_entry_spec.rb