spec/spec_helper.rb in foreman-0.24.0 vs spec/spec_helper.rb in foreman-0.25.0

- old
+ new

@@ -10,10 +10,14 @@ mock(subject).puts("ERROR: #{message}") yield end end +def foreman(args) + Foreman::CLI.start(args.split(" ")) +end + def mock_exit(&block) block.should raise_error(SystemExit) end def write_foreman_config(app) @@ -29,9 +33,15 @@ file.puts "alpha: ./alpha" file.puts "\n" file.puts "bravo:\t./bravo" end 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|