Permalink
Browse files

Adding a base rspec formatter so we don't get double text output when

using custom documentation formatters
  • Loading branch information...
1 parent fe9e237 commit c53739faa1ae7745e22c7e86b2ba919517d08048 @heathkit heathkit committed Jun 23, 2011
Showing with 13 additions and 0 deletions.
  1. +6 −0 lib/ci/reporter/rake/rspec.rb
  2. +7 −0 lib/ci/reporter/rspec.rb
@@ -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
View
@@ -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.