Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

deprecate BehaviourRunner (I don't think anybody uses it)

  • Loading branch information...
commit 91444510df439fc7acd5a308eca574d256a4baef 1 parent c0abf74
David Chelimsky authored
3  History.txt
View
@@ -14,10 +14,11 @@ examples set up as above.
WARNING: mock.should_receive(:msg).with(an_instance_of(klass)) now correctly uses instance_of? instead of kind_of?. This may break some existing code examples, but the fix is to just use kind_of instead of an_instance_of
-* 2 deprecations
+* 3 deprecations
* deprecated ExampleMethods#implementation_backtrace - use ExampleMethods#backtrace instead
* deprecated ExampleGroupMethods#example_group_backtrace - use ExampleGroupMethods#backtrace instead
+ * deprecated Spec::Example::BehaviourRunner class (likely that nobody is using this)
* 6 major enhancements
4 examples/passing/multi_threaded_behaviour_runner.rb → ...es/passing/multi_threaded_example_group_runner.rb
View
@@ -23,6 +23,4 @@ def run
@threads.each {|t| t.join}
success
end
-end
-
-MultiThreadedBehaviourRunner = MultiThreadedExampleGroupRunner
+end
14 lib/spec/runner/example_group_runner.rb
View
@@ -54,7 +54,17 @@ def number_of_examples
@options.number_of_examples
end
end
- # TODO: BT - Deprecate BehaviourRunner?
- BehaviourRunner = ExampleGroupRunner
+
+ class BehaviourRunner < ExampleGroupRunner
+ def initialize(options)
+ Kernel.warn <<-WARNING
+DEPRECATED: The BeheviourRunner class is deprecated and will
+be removed from rspec-1.2.
+
+Use ExampleGroupRunner instead.
+WARNING
+ super
+ end
+ end
end
end
7 spec/spec/runner/example_group_runner_spec.rb
View
@@ -22,5 +22,12 @@ module Runner
end
end
end
+
+ describe BehaviourRunner do
+ it "is DEPRECATED (use ExampleGroupRunner)" do
+ Kernel.should_receive(:warn).with(/DEPRECATED/)
+ BehaviourRunner.new(nil)
+ end
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.