class Mutiny::Integration::RSpec::Hook

Attributes

hook[R]

Public Class Methods

new(hook) click to toggle source
# File lib/mutiny/integration/rspec/hook.rb, line 7
def initialize(hook)
  @hook = hook
end

Public Instance Methods

example_failed(notification) click to toggle source
# File lib/mutiny/integration/rspec/hook.rb, line 22
def example_failed(notification)
  hook.after(notification.example)
end
example_passed(notification) click to toggle source
# File lib/mutiny/integration/rspec/hook.rb, line 26
def example_passed(notification)
  hook.after(notification.example)
end
example_started(notification) click to toggle source
# File lib/mutiny/integration/rspec/hook.rb, line 17
def example_started(notification)
  example = notification.example
  hook.before(example) unless example.pending? || example.skipped?
end
install(configuration) click to toggle source
# File lib/mutiny/integration/rspec/hook.rb, line 11
def install(configuration)
  configuration.reporter.register_listener(self, :example_started)
  configuration.reporter.register_listener(self, :example_failed)
  configuration.reporter.register_listener(self, :example_passed)
end