diff --git a/spec/gem_bench/team_spec.rb b/spec/gem_bench/team_spec.rb index 9f31d5e..c22e8e6 100644 --- a/spec/gem_bench/team_spec.rb +++ b/spec/gem_bench/team_spec.rb @@ -383,18 +383,22 @@ it "shows bad ideas" do allow(scout).to receive(:loaded_gems).and_return([["rspec", "3.13.0"]]) allow(GemBench::Scout).to receive(:new).and_return(scout) + out1 = <<~OUT1.chomp + [GemBench] Will show bad ideas. Be Careful. + [GemBench] Detected 1 loaded gems + [GemBench] Found no gems that need to load at boot time. + OUT1 + out2 = <<~OUT2.chomp + [GemBench] Here are 1 suggestions for improvement: + \t[SUGGESTION] 1) rspec had no files to evaluate. + [GemBench] Evaluated 1 gems against your Gemfile but found no primary dependencies which can safely skip require on boot (require: false). + OUT2 block_is_expected.to not_raise_error.and output( include( - <<~OUT.chomp, - [GemBench] Will show bad ideas. Be Careful. - [GemBench] Detected 1 loaded gems - [GemBench] Found no gems that need to load at boot time. - [GemBench] Evaluated 1 gems and Gemfile at /Users/pboling/src/my/gem_bench/spec/gem_bench/../support/no_benchers.gemfile. - [GemBench] Here are 1 suggestions for improvement: - \t[SUGGESTION] 1) rspec had no files to evaluate. - [GemBench] Evaluated 1 gems against your Gemfile but found no primary dependencies which can safely skip require on boot (require: false). - OUT - ), + out1, + /\[GemBench\] Evaluated 1 gems and Gemfile at [A-Za-z0-9\/]+spec\/gem_bench\/\.\.\/support\/no_benchers\.gemfile/, + out2 + ) ).to_stdout expect(GemBench::Scout).to have_received(:new) end