Module: Ruptr::Compat::RSpec::ExampleGroupInstanceInternal

Included in:
ExampleGroup
Defined in:
lib/ruptr/rspec/example_group.rb

Instance Method Summary collapse

Instance Method Details

#run_example(example) ⇒ Object



61
62
63
64
65
66
67
68
# File 'lib/ruptr/rspec/example_group.rb', line 61

def run_example(example)
  ran = false
  wrap_example_handle(Handle.new(example)) do |h|
    instance_exec(h, &example.block)
    ran = true
  end
  skip unless ran # may happen if an "around" hook didn't call its handle's #run method
end

#wrap_contextObject



57
# File 'lib/ruptr/rspec/example_group.rb', line 57

def wrap_context(&) = wrap_context_handle(Handle.new(self.class), &)

#wrap_context_handle(h) {|h| ... } ⇒ Object

Yields:

  • (h)


56
# File 'lib/ruptr/rspec/example_group.rb', line 56

def wrap_context_handle(h) = yield h

#wrap_example_handle(h) {|h| ... } ⇒ Object

Yields:

  • (h)


59
# File 'lib/ruptr/rspec/example_group.rb', line 59

def wrap_example_handle(h) = yield h