Sha256: 57c72a683fc3e9fb6777df39ec298ddf2a453843a531b2edb0d28d9b955481ee
Contents?: true
Size: 980 Bytes
Versions: 6
Compression:
Stored size: 980 Bytes
Contents
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', 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 ], 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 Rake::Task[ 'build' ].invoke exist?( @project.target ).should be_true end it "runs the program with 'run'" do Rake::Task[ 'run' ].invoke exist?( @test_output_file ).should be_true end end
Version data entries
6 entries across 6 versions & 1 rubygems