Need to return early from StateMachine#method_missing if we're performing a
state predicate check. Originally, the check happened after performing the
event lookup, but this would prevent predicate checks, if the state matched
an event and that even couldn't transition.
This commit fixes this problem and includes a regression unit spec.
Need to return early from StateMachine#method_missing if we're performing a state predicate check. Originally, the check happened after performing the event lookup, but this would prevent predicate checks, if the state matched an event and that even couldn't transition.
This commit fixes this problem and includes a regression unit spec.