Sha256: 754fc6d84695e6b592bb7584dcea128f36ea47bcf69988ce30081ffbd6552d9f

Contents?: true

Size: 864 Bytes

Versions: 1

Compression:

Stored size: 864 Bytes

Contents

$:.unshift File.dirname(__FILE__)

require 'file_system_behaviors'
require 'physical_system_stub'
  
$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..', 'lib', 'buildmaster')

require 'cotta/physical_system'
require 'spec'

module BuildMaster

describe PhysicalSystem do
  it_should_behave_like "FileSystemBehaviors"
  def create_system
    @system = PhysicalSystemStub.new
    @ios = Array.new
  end
  
  after do
    @ios.each {|io| io.close unless io.closed?}
  end

  it 'root directory always exists' do
    @system = PhysicalSystem.new
    @system.dir_exists?(Pathname.new('/')).should == true
    @system.dir_exists?(Pathname.new('D:/')).should == true
  end
  
  it 'shell command should return output' do
    @system = PhysicalSystem.new
    @system.shell('ruby --version')[0..3].should == 'ruby'
  end
end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
BuildMaster-1.1.9 test/buildmaster/cotta/tc_physical_system.rb