lib/spec/runner/options.rb in dchelimsky-rspec-1.1.11.4 vs lib/spec/runner/options.rb in dchelimsky-rspec-1.1.11.5

- old
+ new

@@ -48,12 +48,10 @@ :timeout, :verbose, :user_input_for_runner, :error_stream, :output_stream, - :before_suite_parts, - :after_suite_parts, # TODO: BT - Figure out a better name :argv ) attr_reader :colour, :differ_class, :files, :examples, :example_groups @@ -73,11 +71,10 @@ @example_groups = [] @result = nil @examples_run = false @examples_should_be_run = nil @user_input_for_runner = nil - @before_suite_parts = [] @after_suite_parts = [] end def add_example_group(example_group) @example_groups << example_group @@ -120,10 +117,18 @@ after_suite_parts.each do |part| part.call(success) end end end + + def before_suite_parts + Spec::Example::BeforeAndAfterHooks.before_suite_parts + end + + def after_suite_parts + Spec::Example::BeforeAndAfterHooks.after_suite_parts + end def examples_run? @examples_run end @@ -273,10 +278,10 @@ end def custom_runner return nil unless custom_runner? klass_name, arg = ClassAndArgumentsParser.parse(user_input_for_runner) - runner_type = load_class(klass_name, 'behaviour runner', '--runner') + runner_type = load_class(klass_name, 'example group runner', '--runner') return runner_type.new(self, arg) end def custom_runner? return user_input_for_runner ? true : false