spec/shared/test_coverage.rb in metric_fu-4.11.3 vs spec/shared/test_coverage.rb in metric_fu-4.11.4

- old
+ new

@@ -1,7 +1,6 @@ shared_examples "rcov test coverage generator" do |metric_name| - before do setup_fs MetricFu::Configuration.run do |config| config.configure_metric(metric_name) do |rcov| rcov.enabled = true @@ -13,30 +12,29 @@ @default_options = MetricFu::Metric.get_metric(metric_name).run_options end describe "emit" do before :each do - options = {:external => nil} + options = { external: nil } @rcov = MetricFu::RcovGenerator.new(@default_options.merge(options)) end # TODO: should this be true of this metric? it "should clear out previous output and make output folder" do - expect(MetricFu::Utility).to receive(:rm_rf).with(MetricFu::RcovGenerator.metric_directory, :verbose => false) + expect(MetricFu::Utility).to receive(:rm_rf).with(MetricFu::RcovGenerator.metric_directory, verbose: false) expect(MetricFu::Utility).to receive(:mkdir_p).with(MetricFu::RcovGenerator.metric_directory) @rcov.reset_output_location end - end def rcov_output - FIXTURE.load_file('rcov_output.txt') + FIXTURE.load_file("rcov_output.txt") end describe "with rcov_output fed into" do before :each do - options = {:external => nil} + options = { external: nil } @rcov = MetricFu::RcovGenerator.new(@default_options.merge(options)) expect(@rcov).to receive(:load_output).and_return(rcov_output) @files = @rcov.analyze end @@ -74,11 +72,11 @@ end end end describe "with external configuration option set" do before :each do - options = {:external => 'coverage/rcov.txt'} + options = { external: "coverage/rcov.txt" } @rcov = MetricFu::RcovGenerator.new(@default_options.merge(options)) end it "should emit nothing if external configuration option is set" do expect(MetricFu::Utility).not_to receive(:rm_rf) @@ -87,13 +85,11 @@ it "should open the external rcov analysis file" do expect(@rcov).to receive(:load_output).and_return(rcov_output) @files = @rcov.analyze end - end after do cleanup_fs end - end