rspec-quickfix-formatter-bintz/lib/rspec/quick_fix_formatter.rb

26 lines
574 B
Ruby
Raw Normal View History

2011-03-30 13:21:31 +00:00
require 'rspec/core/formatters/base_text_formatter'
2011-03-30 13:11:02 +00:00
module RSpec
2011-03-30 13:14:49 +00:00
class QuickFixFormatter < RSpec::Core::Formatters::BaseTextFormatter
2011-03-30 13:11:02 +00:00
def dump_summary(duration, example_count, failure_count, pending_count)
end
def dump_profile
end
def dump_pending
end
def dump_failures
failed_examples.each do |example|
2011-07-15 17:34:24 +00:00
output.puts "%s:%s:%s" % [
example.file_path,
example.metadata[:line_number],
example.metadata[:execution_result][:exception].message.gsub("\n", ' ')
]
2011-03-30 13:11:02 +00:00
end
end
end
end