class Spinach::HookNotYieldException

This class represents the exception raised when Spinach detects that the around_scenario hook does not yield.

Attributes

hook[R]

Public Class Methods

new(hook) click to toggle source

@param [String] hook

The hook which did not yield

@api public

# File lib/spinach/exceptions.rb, line 59
def initialize(hook)
  @hook = hook
end

Public Instance Methods

message() click to toggle source

@return [String]

A custom message when a hook did not yield.

@api public

# File lib/spinach/exceptions.rb, line 67
def message
  "#{@hook} hooks *must* yield"
end