Class: RSpec::Matchers::BuiltIn::RaiseError

Inherits:
Object
  • Object
show all
Defined in:
lib/chefspec/expect_exception.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.last_runObject

Returns the value of attribute last_run.



3
4
5
# File 'lib/chefspec/expect_exception.rb', line 3

def last_run
  @last_run
end

Instance Attribute Details

#expected_messageObject (readonly)

Returns the value of attribute expected_message.



6
7
8
# File 'lib/chefspec/expect_exception.rb', line 6

def expected_message
  @expected_message
end

Instance Method Details

#last_error_for_chefspecObject



8
9
10
# File 'lib/chefspec/expect_exception.rb', line 8

def last_error_for_chefspec
  @expected_error
end

#matches?(*args) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/chefspec/expect_exception.rb', line 13

def matches?(*args)
  self.class.last_run = self
  old_matches?(*args)
end

#old_matches?Object



12
# File 'lib/chefspec/expect_exception.rb', line 12

alias_method :old_matches?, :matches?