summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-08-11 15:53:06 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-08-11 15:53:06 -0500
commit767ac0e565008782c3d0e79cfc79e95d35e0400f (patch)
tree5b6a809a9894797c8b4fd96d1dba444ca4e0b42d
parent1caf3747243f8097c3ed69f4d808646c4171d7e2 (diff)
downloadbundler-767ac0e565008782c3d0e79cfc79e95d35e0400f.tar.gz
Support running the specs with formatters that dont have #message
-rw-r--r--spec/support/sometimes.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/sometimes.rb b/spec/support/sometimes.rb
index 1ecbd36e2d..6a50f5ff4c 100644
--- a/spec/support/sometimes.rb
+++ b/spec/support/sometimes.rb
@@ -33,7 +33,8 @@ RSpec.configure do |config|
message = proc do |color, text|
colored = RSpec::Core::Formatters::ConsoleCodes.wrap(text, color)
notification = RSpec::Core::Notifications::MessageNotification.new(colored)
- RSpec.configuration.formatters.first.message(notification)
+ formatter = RSpec.configuration.formatters.first
+ formatter.message(notification) if formatter.respond_to?(:message)
end
retried_examples = RSpec.world.example_groups.map do |g|