diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-08-11 15:53:06 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-08-11 15:53:06 -0500 |
commit | 767ac0e565008782c3d0e79cfc79e95d35e0400f (patch) | |
tree | 5b6a809a9894797c8b4fd96d1dba444ca4e0b42d /spec/support | |
parent | 1caf3747243f8097c3ed69f4d808646c4171d7e2 (diff) | |
download | bundler-767ac0e565008782c3d0e79cfc79e95d35e0400f.tar.gz |
Support running the specs with formatters that dont have #message
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/sometimes.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/sometimes.rb b/spec/support/sometimes.rb index 1ecbd36e..6a50f5ff 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| |