Class: RSpec::Core::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/conductor/worker.rb

Overview

RSpec doesn’t provide us with a good way to handle before/after suite hooks, doing what we can here

Instance Method Summary collapse

Instance Method Details

#__run_after_suite_hooksObject



11
12
13
14
# File 'lib/rspec/conductor/worker.rb', line 11

def __run_after_suite_hooks
  RSpec.current_scope = :after_suite_hook if RSpec.respond_to?(:current_scope=)
  run_suite_hooks("an `after(:suite)` hook", @after_suite_hooks) if respond_to?(:run_suite_hooks)
end

#__run_before_suite_hooksObject



6
7
8
9
# File 'lib/rspec/conductor/worker.rb', line 6

def __run_before_suite_hooks
  RSpec.current_scope = :before_suite_hook if RSpec.respond_to?(:current_scope=)
  run_suite_hooks("a `before(:suite)` hook", @before_suite_hooks) if respond_to?(:run_suite_hooks)
end