Sha256: 810bbb7c2c0d3a988dd1e9292de908360f70181dbf473ef19a8432fe39466e08

Contents?: true

Size: 819 Bytes

Versions: 15

Compression:

Stored size: 819 Bytes

Contents

require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])

describe SC::Tools, 'build-number' do
  
  include SC::SpecHelpers
  
  before do 
    @tool = SC::Tools.new('build_number')
  end
  
  it "should raise error if no target is passed" do
    lambda { @tool.build_number }.should raise_error
  end
  
  it "should raise error if more than one target is passed" do
    lambda { @tool.build_number('target1','target2') }.should raise_error
  end
  
  it "should write build number when passed target" do
    @tool.project = fixture_project(:real_world) # req...
    bn = capture('stdout') { @tool.build_number('sproutcore') }
    
    expected_target = fixture_project(:real_world).target_for(:sproutcore)
    expected = expected_target.prepare!.compute_build_number
    bn.should eql(expected)
  end
  
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090407205609 spec/lib/tools/build_number_spec.rb
sproutit-sproutcore-1.0.0.20090408130025 spec/lib/tools/build_number_spec.rb
sproutit-sproutcore-1.0.0.20090416161445 spec/lib/tools/build_number_spec.rb
sproutit-sproutcore-1.0.20090721145236 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1031 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1030 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1029 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1027 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1028 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1026 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1025 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1024 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1009 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1008 spec/lib/tools/build_number_spec.rb
sproutcore-1.0.1003 spec/lib/tools/build_number_spec.rb