Skip to content

Commit

Permalink
Adding a base rspec formatter so we don't get double text output when
Browse files Browse the repository at this point in the history
using custom documentation formatters
  • Loading branch information
heathkit committed Jun 23, 2011
1 parent fe9e237 commit c53739f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/ci/reporter/rake/rspec.rb
Expand Up @@ -21,5 +21,11 @@
"--format", "CI::Reporter::RSpecDoc"].join(" ")
ENV["SPEC_OPTS"] = "#{ENV['SPEC_OPTS']} #{spec_opts}"
end

task :rspecbase => :spec_report_cleanup do
spec_opts = ["--require", CI::Reporter.maybe_quote_filename("#{File.dirname(__FILE__)}/rspec_loader.rb"),
"--format", "CI::Reporter::RSpecBase"].join(" ")
ENV["SPEC_OPTS"] = "#{ENV['SPEC_OPTS']} #{spec_opts}"
end
end
end
7 changes: 7 additions & 0 deletions lib/ci/reporter/rspec.rb
Expand Up @@ -205,5 +205,12 @@ def initialize(*args)
super
end
end

class RSpecBase < RSpec
def initialize(*args)
@formatter = RSpecFormatters::BaseFormatter.new(*args)
super
end
end
end
end

0 comments on commit c53739f

Please sign in to comment.