add ability to test full comamnd line

This commit is contained in:
David Dollar
2011-10-04 11:30:28 -04:00
parent ba18f7e589
commit 86e4251840
2 changed files with 19 additions and 0 deletions
+10
View File
@@ -12,6 +12,10 @@ def mock_error(subject, message)
end
end
def foreman(args)
Foreman::CLI.start(args.split(" "))
end
def mock_exit(&block)
block.should raise_error(SystemExit)
end
@@ -33,6 +37,12 @@ def write_procfile(procfile="Procfile")
File.expand_path(procfile)
end
def write_env(env=".env")
File.open(env, "w") do |file|
file.puts "FOO=bar"
end
end
def load_export_templates_into_fakefs(type)
FakeFS.deactivate!
files = Dir[File.expand_path("../../data/export/#{type}/**", __FILE__)].inject({}) do |hash, file|