Class: ChefSpec::ExpectException
- Inherits:
-
Object
- Object
- ChefSpec::ExpectException
- Defined in:
- lib/chefspec/expect_exception.rb
Instance Method Summary collapse
- #expected? ⇒ Boolean
-
#initialize(formatter_exception, formatter_message = nil) ⇒ ExpectException
constructor
A new instance of ExpectException.
Constructor Details
#initialize(formatter_exception, formatter_message = nil) ⇒ ExpectException
Returns a new instance of ExpectException.
21 22 23 24 25 |
# File 'lib/chefspec/expect_exception.rb', line 21 def initialize(formatter_exception, = nil) @formatter_exception = formatter_exception @formatter_message = @matcher = RSpec::Matchers::BuiltIn::RaiseError.last_run end |
Instance Method Details
#expected? ⇒ Boolean
27 28 29 30 31 |
# File 'lib/chefspec/expect_exception.rb', line 27 def expected? return false if @matcher.nil? exception_matched? && end |