Create rspec test structure for build tests
This commit is contained in:
parent
07579fea35
commit
22e332e1fe
5
Rakefile
5
Rakefile
@ -1 +1,6 @@
|
|||||||
require "bundler/gem_tasks"
|
require "bundler/gem_tasks"
|
||||||
|
require "rspec/core/rake_task"
|
||||||
|
|
||||||
|
RSpec::Core::RakeTask.new(:spec)
|
||||||
|
|
||||||
|
task :default => :spec
|
||||||
|
2
build_tests/c-simple/spec.rb
Normal file
2
build_tests/c-simple/spec.rb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
it 'builds a C program with one source file' do
|
||||||
|
end
|
13
spec/build_tests_spec.rb
Normal file
13
spec/build_tests_spec.rb
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
require 'fileutils'
|
||||||
|
|
||||||
|
describe Rscons do
|
||||||
|
FileUtils.rm_rf('build_tests/test')
|
||||||
|
test_dirs = Dir['build_tests/*/']
|
||||||
|
test_dirs.each do |build_test_rel_path|
|
||||||
|
FileUtils.cp_r(build_test_rel_path, 'build_tests/test')
|
||||||
|
Dir.chdir('build_tests/test') do
|
||||||
|
instance_eval(File.read('spec.rb'))
|
||||||
|
end
|
||||||
|
FileUtils.rm_rf('build_tests/test')
|
||||||
|
end
|
||||||
|
end
|
1
spec/spec_helper.rb
Normal file
1
spec/spec_helper.rb
Normal file
@ -0,0 +1 @@
|
|||||||
|
require "rscons"
|
Loading…
x
Reference in New Issue
Block a user