class QuickfixFormatter < BaseTextFormatter RSpec::Core::Formatters.register self, :example_failed def initialize(output) @output = output end def example_failed(notification) @output << format(notification) + "\n" end def format(notification) fmt = "%s: %s" % [notification.example.location, notification.exception.message] fmt.gsub("\n", ' ')[0,160] end end end end end http://git.io/vCwCw