aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/spec_helper.rb')
-rw-r--r--Library/Homebrew/test/spec_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb
index 292c5786a..63ffe63fe 100644
--- a/Library/Homebrew/test/spec_helper.rb
+++ b/Library/Homebrew/test/spec_helper.rb
@@ -33,6 +33,8 @@ RSpec.configure do |config|
begin
TEST_DIRECTORIES.each(&:mkpath)
+ @__homebrew_failed = Homebrew.failed?
+
@__files_before_test = Find.find(TEST_TMPDIR).map { |f| f.sub(TEST_TMPDIR, "") }
@__argv = ARGV.dup
@@ -72,6 +74,10 @@ RSpec.configure do |config|
file leak detected:
#{diff.map { |f| " #{f}" }.join("\n")}
EOS
+
+ Homebrew.failed = @__homebrew_failed
end
end
end
+
+RSpec::Matchers.alias_matcher :have_failed, :be_failed