class StateMachineRspec::Matchers::RejectStateMatcher
Public Instance Methods
description()
click to toggle source
Calls superclass method
StateMachineRspec::Matchers::States::Matcher#description
# File lib/matchers/states/reject_state.rb, line 15 def description message = super message << " on #{state_machine_scope.inspect}" if state_machine_scope "not have #{message}" end
matches_states?(states)
click to toggle source
# File lib/matchers/states/reject_state.rb, line 11 def matches_states?(states) no_defined_states? end
Private Instance Methods
no_defined_states?()
click to toggle source
# File lib/matchers/states/reject_state.rb, line 23 def no_defined_states? defined_states = @introspector.defined_states(@states) unless defined_states.empty? @failure_message = "Did not expect #{@introspector.state_machine_attribute} " + "to allow states: #{defined_states.join(', ')}" end defined_states.empty? end