Permalink
Browse files

work for rspec 2

  • Loading branch information...
1 parent 089d731 commit 17412496d0cc4fcf4ad1f8d400ea2a9be98bc1f4 Pat Maddox committed Aug 25, 2010
Showing with 7 additions and 9 deletions.
  1. +7 −9 spec/spec_helper.rb
View
@@ -1,28 +1,26 @@
require 'rubygems'
-require 'spec'
+require 'rspec'
Dir[File.dirname(__FILE__) + '/../lib/**/*.rb'].each do |ruby_file|
require ruby_file
end
-class OneAtATimeReporter < Spec::Runner::Reporter
+class OneAtATimeReporter < RSpec::Core::Reporter
def example_started(example)
super unless @has_failed
end
- def example_failed(example, error)
+ def example_failed(example)
unless @has_failed
@has_failed = true
super
end
end
+end
- def example_finished(example, error=nil)
- super unless @has_failed
+class RSpec::Core::Configuration
+ def reporter
+ @reporter ||= OneAtATimeReporter.new(formatter)
end
end
-Spec::Runner.options.reporter = OneAtATimeReporter.new(Spec::Runner.options)
-
-
-

0 comments on commit 1741249

Please sign in to comment.