diff --git a/lib/ci/reporter/rake/rspec.rb b/lib/ci/reporter/rake/rspec.rb index 291c719..f89e546 100644 --- a/lib/ci/reporter/rake/rspec.rb +++ b/lib/ci/reporter/rake/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 diff --git a/lib/ci/reporter/rspec.rb b/lib/ci/reporter/rspec.rb index 61b111d..b3aa0c5 100644 --- a/lib/ci/reporter/rspec.rb +++ b/lib/ci/reporter/rspec.rb @@ -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