Sha256: 1747e91d049b0c455cf922abefd9f00d0ada9127fbec267d44d0e7b8f1ca0598
Contents?: true
Size: 683 Bytes
Versions: 3
Compression:
Stored size: 683 Bytes
Contents
require 'spec_helper' describe FS do describe 'test dir' do it 'is absolute' do Pathname.new(@test_dir).should be_absolute end it 'is created' do File.exist?(@test_dir).should be_true end it 'is a directory' do File.directory?(@test_dir).should be_true end it 'is empty' do Dir.entries(@test_dir).should eql([".", ".."]) end it 'is the current dir' do File.expand_path(Dir.pwd).should eql(@test_dir) end it 'is deleted when not empty' do filename = 'test.file' FileUtils.touch(filename) File.exist?(File.join(@test_dir, filename)).should be_true end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fs-0.1.1 | spec/test_dir_spec.rb |
fs-0.1.0 | spec/test_dir_spec.rb |
fs-0.0.2 | spec/test_dir_spec.rb |