Sha256: 3375eab05cb82711985b3b0830f0cb6bf5d45fc0c1defcbb3bc2acfd495850ec
Contents?: true
Size: 933 Bytes
Versions: 1
Compression:
Stored size: 933 Bytes
Contents
require 'spec_helper' class Dummy @solution = "solution/path/whammy" include PrePush end class NilClass def success? end end describe PrePush do describe 'build' do it "should call system to build the solution" do Dummy.should_receive("system").with(/solution\/path\/whammy$/) Dummy.build end end describe 'run_tests' do it 'should call system to run tests in specified assemblies' do Dummy.should_receive("system").with(/some_test_proj.csproj/) Dummy.run_tests(['some_test_proj.csproj']) end end describe 'run' do it 'should exit with code 1 when build or tests fail' do Dummy.should_receive("system").with(/solution\/path\/whammy/).twice system('false') if $? != nil Dummy.should_receive("exit").with(1).twice Dummy.should_receive("puts").with('build has failed') Dummy.should_receive("puts").with('Tests have failed') Dummy.run end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pre_push-0.0.1 | spec/pre_push_spec.rb |