fix build_tests spec to change directories properly
This commit is contained in:
parent
62e9bfa5d3
commit
036b968ce9
@ -4,10 +4,17 @@ 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'))
|
||||
context build_test_rel_path do
|
||||
before do
|
||||
FileUtils.cp_r(build_test_rel_path, 'build_tests/test')
|
||||
@owd = Dir.pwd
|
||||
Dir.chdir('build_tests/test')
|
||||
end
|
||||
instance_eval(File.read(File.join(build_test_rel_path, 'spec.rb')))
|
||||
after do
|
||||
Dir.chdir(@owd)
|
||||
FileUtils.rm_rf('build_tests/test')
|
||||
end
|
||||
end
|
||||
FileUtils.rm_rf('build_tests/test')
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user