Module: Specjour::RSpec::Runner

Defined in:
lib/specjour/rspec/runner.rb

Class Method Summary collapse

Class Method Details

.run(spec, output) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/specjour/rspec/runner.rb', line 4

def self.run(spec, output)
  args = ['--format=Specjour::RSpec::DistributedFormatter', spec]
  ::RSpec::Core::Runner.run args, $stderr, output
ensure
  ::RSpec.configuration.filter_manager = ::RSpec::Core::FilterManager.new
  ::RSpec.world.filtered_examples.clear
  ::RSpec.world.inclusion_filter.clear
  ::RSpec.world.exclusion_filter.clear
  ::RSpec.world.send(:instance_variable_set, :@line_numbers, nil)
end