spec/dir_spec.rb in vfs-0.3.14 vs spec/dir_spec.rb in vfs-0.3.15
- old
+ new
@@ -101,11 +101,16 @@
list = []
@path.entries{|e| list << e}
list.to_set.should be_eql([@path.dir('dir'), @path.file('file')].to_set)
end
- it "glob search support"
+ it "glob search support" do
+ @path.dir('dir_a').create
+ @path.file('file_a').create
+ @path.dir('dir_b').create
+ @path.entries('*_a').collect(&:name).sort.should == %w(dir_a file_a)
+ end
it 'should raise error if trying :entries on file' do
@path.file('some_file').create
-> {@path.dir('some_file').entries}.should raise_error(/File/)
end
@@ -123,10 +128,13 @@
@path.include?('dir/another_dir').should be_true
@path.include?('file').should be_true
@path.include?('non_existing').should be_false
end
- it 'empty?'
+ it 'empty?' do
+ @path.empty?.should be_false
+ @path.dir('empty_dir').create.empty?.should be_true
+ end
end
describe 'copying' do
before do
@from = @path.dir
\ No newline at end of file