spec/spec_helper.rb in foreman-0.87.2 vs spec/spec_helper.rb in foreman-0.88.1

- old
+ new

@@ -1,15 +1,5 @@ -# it throws following message: -# W, [2018-02-06T18:16:06.360071 #72025] WARN -- : This usage of the Code Climate Test Reporter is now deprecated. Since version -# 1.0, we now require you to run `SimpleCov` in your test/spec helper, and then -# run the provided `codeclimate-test-reporter` binary separately to report your -# results to Code Climate. -# -# More information here: https://github.com/codeclimate/ruby-test-reporter/blob/master/README.md -# require "codeclimate-test-reporter" -# CodeClimate::TestReporter.start - require "simplecov" SimpleCov.start do add_filter "/spec/" end @@ -76,11 +66,11 @@ Process.wait(pid) $?.exitstatus end def mock_exit(&block) - expect(block).to raise_error(SystemExit) + expect { block.call }.to raise_error(SystemExit) end def write_foreman_config(app) File.open("/etc/foreman/#{app}.conf", "w") do |file| file.puts %{#{app}_processes="alpha bravo"} @@ -178,10 +168,7 @@ config.color = true config.order = 'rand' config.include FakeFS::SpecHelpers, :fakefs config.before(:each) do FileUtils.mkdir_p('/tmp') - end - config.after(:each) do - FileUtils.rm_rf('/tmp') end end