Class: RSpec::Puppet::GenericMatchers::RaiseError

Inherits:
Matchers::BuiltIn::RaiseError
  • Object
show all
Defined in:
lib/rspec-puppet/matchers/raise_error.rb

Overview

Due to significant code base depending on the

is_expected.to raise_error Puppet::Error

syntax, and removal of this syntax from RSpec, extend RSpec’s built-in ‘raise_error` matcher to accept a value target, e.g. a subject defined as a lambda, e.g.:

subject(:catalogue) { lambda { load_catalogue } }

Instance Method Summary collapse

Instance Method Details

#supports_value_expectations?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/rspec-puppet/matchers/raise_error.rb', line 16

def supports_value_expectations?
  true
end