lib/spec/runner.rb in dchelimsky-rspec-1.1.11.3 vs lib/spec/runner.rb in dchelimsky-rspec-1.1.11.4
- old
+ new
@@ -1,5 +1,6 @@
+require 'spec/runner/configuration'
require 'spec/runner/options'
require 'spec/runner/option_parser'
require 'spec/runner/example_group_runner'
require 'spec/runner/command_line'
require 'spec/runner/drb_command_line'
@@ -8,23 +9,33 @@
require 'spec/runner/spec_parser'
require 'spec/runner/class_and_arguments_parser'
module Spec
module Runner
+
+ class ExampleGroupCreationListener
+ def register_example_group(klass)
+ Spec::Runner.options.add_example_group klass
+ Spec::Runner.register_at_exit_hook
+ end
+ end
+
+ Spec::Example::ExampleGroupMethods.example_group_creation_listeners << ExampleGroupCreationListener.new
+
class << self
def configuration # :nodoc:
- @configuration ||= Spec::Example::Configuration.new
+ @configuration ||= Spec::Runner::Configuration.new
end
# Use this to configure various configurable aspects of
# RSpec:
#
# Spec::Runner.configure do |configuration|
# # Configure RSpec here
# end
#
# The yielded <tt>configuration</tt> object is a
- # Spec::Example::Configuration instance. See its RDoc
+ # Spec::Runner::Configuration instance. See its RDoc
# for details about what you can do with it.
#
def configure
yield configuration
end