diff --git a/lib/rspec-quickfix-formatter/base.rb b/lib/rspec-quickfix-formatter/base.rb new file mode 100644 index 0000000..6d22fba --- /dev/null +++ b/lib/rspec-quickfix-formatter/base.rb @@ -0,0 +1,17 @@ +module QuickFixFormatterBase + 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| + output.puts "%s:%s:%s" % [ example.file_path, example.metadata[:line_number], example.metadata[:execution_result][:exception].message.gsub("\n", ' ') ] + end + end +end + diff --git a/lib/spec/quick_fix_formatter.rb b/lib/spec/quick_fix_formatter.rb new file mode 100644 index 0000000..71057fb --- /dev/null +++ b/lib/spec/quick_fix_formatter.rb @@ -0,0 +1,9 @@ +require 'spec/runner/formatter/base_formatter' +require 'rspec-quickfix-formatter/base' + +module Spec::Runner::Formatter + class QuickFixFormatter < BaseFormatter + include QuickFixFormatterBase + end +end +