diff options
Diffstat (limited to 'Library/Homebrew/test/utils_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/utils_spec.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Library/Homebrew/test/utils_spec.rb b/Library/Homebrew/test/utils_spec.rb index de6b287d2..040ad630b 100644 --- a/Library/Homebrew/test/utils_spec.rb +++ b/Library/Homebrew/test/utils_spec.rb @@ -1,7 +1,5 @@ require "utils" -RSpec::Matchers.alias_matcher :have_failed, :be_failed - describe "globally-scoped helper methods" do let(:dir) { @dir = Pathname.new(Dir.mktmpdir) } @@ -13,15 +11,11 @@ describe "globally-scoped helper methods" do describe "#ofail" do it "sets Homebrew.failed to true" do - begin - shutup do - ofail "foo" - end + expect { + ofail "foo" + }.to output("Error: foo\n").to_stderr - expect(Homebrew).to have_failed - ensure - Homebrew.failed = false - end + expect(Homebrew).to have_failed end end |
