Class: Crabfarm::Live::NavigatorRunnerRSpec

Inherits:
Object
  • Object
show all
Defined in:
lib/crabfarm/live/navigator_runner_rspec.rb

Direct Known Subclasses

ReducerRunnerRSpec

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_manager, _target) ⇒ NavigatorRunnerRSpec



10
11
12
13
# File 'lib/crabfarm/live/navigator_runner_rspec.rb', line 10

def initialize(_manager, _target)
  @manager = _manager
  @target = _target
end

Instance Attribute Details

#exampleObject (readonly)

Returns the value of attribute example.



8
9
10
# File 'lib/crabfarm/live/navigator_runner_rspec.rb', line 8

def example
  @example
end

Instance Method Details

#executeObject



15
16
17
18
# File 'lib/crabfarm/live/navigator_runner_rspec.rb', line 15

def execute
  @example = Utils::RSpecRunner.run_single_spec_for spec_for(@target), :live
  bubble_standard_errors
end

#show_resultsObject



20
21
22
23
24
25
26
# File 'lib/crabfarm/live/navigator_runner_rspec.rb', line 20

def show_results
  if example.nil?
    show_empty_warning
  else
    show_example_output
  end
end