spec/c_project_spec.rb in rake-builder-0.0.14 vs spec/c_project_spec.rb in rake-builder-0.0.15

- old
+ new

@@ -1,33 +1,40 @@ -require File.dirname(__FILE__) + '/spec_helper.rb' +load File.dirname(__FILE__) + '/spec_helper.rb' describe 'when building a C project' do include RakeBuilderHelper before( :all ) do - @test_output_file = Rake::Path.expand_with_root( 'rake-c-testfile.txt', SPEC_PATH ) + @test_output_file = Rake::Path.expand_with_root( 'rake-c-testfile.txt', RakeBuilderHelper::SPEC_PATH ) end before( :each ) do Rake::Task.clear @project = c_task( :executable ) - @expected_generated = Rake::Path.expand_all_with_root( [ './main.o', @project.makedepend_file, @project.target ], SPEC_PATH ) + @expected_generated = Rake::Path.expand_all_with_root( + [ + './main.o', + @project.makedepend_file, @project.target + ], + RakeBuilderHelper::SPEC_PATH + ) `rm -f #{ @test_output_file }` `rm -f #{ @project.target }` end after( :each ) do Rake::Task[ 'clean' ].invoke `rm -f #{ @test_output_file }` + `rm -f '#{ @project.local_config }'` end - it 'builds the program with \'build\'' do + it "builds the program with 'build'" do Rake::Task[ 'build' ].invoke exist?( @project.target ).should be_true end - it 'runs the program with \'run\'' do + it "runs the program with 'run'" do Rake::Task[ 'run' ].invoke exist?( @test_output_file ).should be_true end end