Class: Spec::Runner::Options::SingleExampleRunner

Inherits:
ExampleGroupRunner
  • Object
show all
Defined in:
lib/deep_test/spec/extensions/options.rb

Defined Under Namespace

Modules: ExampleGroupHelper

Instance Method Summary collapse

Constructor Details

#initialize(options, example) ⇒ SingleExampleRunner

Returns a new instance of SingleExampleRunner.



10
11
12
13
14
# File 'lib/deep_test/spec/extensions/options.rb', line 10

def initialize(options, example)
  super(options)
  @example = example
  example_group.extend ExampleGroupHelper
end

Instance Method Details

#example_groupObject



16
17
18
# File 'lib/deep_test/spec/extensions/options.rb', line 16

def example_group
  @example.class
end

#example_groupsObject



20
21
22
# File 'lib/deep_test/spec/extensions/options.rb', line 20

def example_groups
  [example_group]
end

#runObject



24
25
26
27
28
# File 'lib/deep_test/spec/extensions/options.rb', line 24

def run
  example_group.with_example_objects([@example]) do
    super
  end
end