Sha256: c3610416bebe11dabfcea5d7d709ab718521ac83dcd646a3a8f1e8782ed304a2

Contents?: true

Size: 817 Bytes

Versions: 2

Compression:

Stored size: 817 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')

require 'spec'
require 'buildmaster/cotta'
require 'buildmaster/cotta/in_memory_system'

module BuildMaster

context 'Cotta' do
  setup do
    @system = InMemorySystem.new
    @cotta = Cotta.new(@system)
  end
  
  specify 'shell out command to system' do
    @cotta.shell('shell command')
    @system.executed_commands.length.should_equal 1
    @system.executed_commands[0].should_equal 'shell command'
  end
  
  specify 'instantiate dir from cotta' do
    dir = @cotta.dir('dirname')
    dir.name.should_equal 'dirname'
  end
  
  specify 'instantiate file from cotta' do
    file = @cotta.file('one/two/three.txt')
    file.name.should_equal 'three.txt'
    file.parent.name.should_equal 'two'
  end
end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
BuildMaster-0.9.0 test/buildmaster/cotta/tc_cotta.rb
BuildMaster-0.9.1 test/buildmaster/cotta/tc_cotta.rb