Class: Mutiny::Integration::RSpec::Context
- Inherits:
-
Object
- Object
- Mutiny::Integration::RSpec::Context
- Defined in:
- lib/mutiny/integration/rspec/context.rb
Overview
This code originally based on Markus Schirp’s implementation of Mutant::Integration::Rspec
https://github.com/mbj/mutant/blob/master/lib/mutant/integration/rspec.rb
Constant Summary collapse
- CLI_OPTIONS =
NB: the –fail-fast option can be used in order to find only the first failing test CLI_OPTIONS = %w(spec –fail-fast)
%w(spec)
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#runner ⇒ Object
readonly
Returns the value of attribute runner.
-
#world ⇒ Object
readonly
Returns the value of attribute world.
Instance Method Summary collapse
-
#initialize ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize ⇒ Context
Returns a new instance of Context.
16 17 18 19 20 21 22 |
# File 'lib/mutiny/integration/rspec/context.rb', line 16 def initialize @output = StringIO.new @world = ::RSpec.world @configuration = ::RSpec.configuration @runner = ::RSpec::Core::Runner.new(::RSpec::Core::ConfigurationOptions.new(CLI_OPTIONS)) @runner.setup($stderr, @output) end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
14 15 16 |
# File 'lib/mutiny/integration/rspec/context.rb', line 14 def configuration @configuration end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
14 15 16 |
# File 'lib/mutiny/integration/rspec/context.rb', line 14 def output @output end |
#runner ⇒ Object (readonly)
Returns the value of attribute runner.
14 15 16 |
# File 'lib/mutiny/integration/rspec/context.rb', line 14 def runner @runner end |
#world ⇒ Object (readonly)
Returns the value of attribute world.
14 15 16 |
# File 'lib/mutiny/integration/rspec/context.rb', line 14 def world @world end |