test/buildmaster/cotta/tc_cotta.rb in BuildMaster-1.1.9 vs test/buildmaster/cotta/tc_cotta.rb in BuildMaster-1.1.12

- old
+ new

@@ -1,15 +1,12 @@ require 'spec' -$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..', 'lib', 'buildmaster') +require File.dirname(__FILE__) + '/../test' -require 'cotta' -require 'cotta/in_memory_system' - module BuildMaster -describe 'Cotta' do +describe Cotta do before do # Given @system = InMemorySystem.new @cotta = Cotta.new(@system) end @@ -36,22 +33,22 @@ end it 'entry creates file or directory based on which one exists' do @cotta.file('file').save @cotta.dir('dir').mkdirs - @cotta.entry('file').exists?.should == true - @cotta.entry('dir').exists?.should == true + @cotta.entry('file').should be_exist + @cotta.entry('dir').should be_exist end it 'nil in, nil out' do @cotta.file(nil).should be_nil @cotta.dir(nil).should be_nil Cotta.file(nil).should be_nil Cotta.dir(nil).should be_nil end it 'create parent directory directly from __FILE__' do - actual = BuildMaster::Cotta.parent_of(__FILE__) + actual = BuildMaster::Cotta.parent_dir(__FILE__) actual.name.should == 'cotta' end end