isolate builder relative feature

This commit is contained in:
Thomas Reynolds 2011-08-05 15:29:21 -07:00
parent b133782395
commit b5a9b78f42
5 changed files with 10 additions and 6 deletions

View file

@ -13,9 +13,10 @@ Then /^cleanup built app at "([^"]*)"$/ do |path|
FileUtils.rm_rf(target)
end
Given /^a built test app with flags "([^"]*)"$/ do |flags|
target = File.join(File.dirname(File.dirname(File.dirname(__FILE__))), "fixtures", "test-app")
build_cmd = File.expand_path(File.join(File.dirname(File.dirname(File.dirname(__FILE__))), "bin", "middleman build"))
Given /^a built app at "([^"]*)" with flags "([^"]*)"$/ do |path, flags|
root = File.dirname(File.dirname(File.dirname(__FILE__)))
target = File.join(root, "fixtures", path)
build_cmd = File.expand_path(File.join(root, "bin", "middleman build"))
`cd #{target} && #{build_cmd} #{flags}`
end