Class: Mutant::Strategy::Rspec

Inherits:
Mutant::Strategy show all
Defined in:
lib/mutant/strategy/rspec.rb

Overview

Rspec killer strategy

Constant Summary collapse

KILLER =
Killer::Forking.new(Killer::Rspec)

Instance Method Summary collapse

Methods inherited from Mutant::Strategy

#kill, #teardown

Instance Method Details

#configurationRSpec::Core::Configuration

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return configuration

Returns:

  • (RSpec::Core::Configuration)


33
34
35
# File 'lib/mutant/strategy/rspec.rb', line 33

def configuration
  RSpec::Core::Configuration.new
end

#example_groupsEnumerable<RSpec::Core::ExampleGroup>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return example groups

Returns:

  • (Enumerable<RSpec::Core::ExampleGroup>)


44
45
46
# File 'lib/mutant/strategy/rspec.rb', line 44

def example_groups
  world.example_groups
end

#setupself

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Setup rspec strategy

Returns:

  • (self)


17
18
19
20
21
22
23
24
# File 'lib/mutant/strategy/rspec.rb', line 17

def setup
  output = StringIO.new
  configuration.error_stream = output
  configuration.output_stream = output
  options.configure(configuration)
  configuration.load_spec_files
  self
end