1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/spec/unit
Norman Clarke bf7ff4c44a
Cast string to symbol in fire/fire!, and fix deceptive error class and message (#788)
* Cast string to sym when checking event in `fire`

* Return early from method if event found

* Change message to reference Event, not State

* Add UndefinedEvent exception

Previously the code raised "UndefinedState" when it failed to find an
Event. This is confusing but was already released to the public. So this
adds UndefinedEvent as a subclass of UndefinedState and raises it
instead.

* Update Changelog
2022-07-27 15:28:17 +05:30
..
invokers chore(invokers): Refactor callback invokers, add class-callbacks support 2018-06-19 21:11:56 +03:00
persistence add specs 2021-03-25 14:06:04 +05:30
abstract_class_spec.rb Fix no_direct_assignment config for abstract base class 2019-04-21 17:46:52 +05:30
api_spec.rb Remove ruby 2.3 support and fix human_state to use display option 2020-08-11 19:48:07 +05:30
basic_two_state_machines_example_spec.rb
callback_multiple_spec.rb Fix callback argument for :before_success & :success callback. 2019-05-20 17:56:52 +05:30
callbacks_spec.rb Cast string to symbol in fire/fire!, and fix deceptive error class and message (#788) 2022-07-27 15:28:17 +05:30
complex_example_spec.rb Cast string to symbol in fire/fire!, and fix deceptive error class and message (#788) 2022-07-27 15:28:17 +05:30
complex_multiple_example_spec.rb
edge_cases_spec.rb
event_multiple_spec.rb
event_naming_spec.rb
event_spec.rb Cast string to symbol in fire/fire!, and fix deceptive error class and message (#788) 2022-07-27 15:28:17 +05:30
event_with_keyword_arguments_spec.rb Fixed an error in Ruby 3 when specifying a method that takes keyword arguments, such as event's before hook. (#777) 2022-04-14 23:31:56 +05:30
exception_spec.rb
guard_arguments_check_spec.rb
guard_multiple_spec.rb
guard_spec.rb
guard_with_params_multiple_spec.rb
guard_with_params_spec.rb
guard_without_from_specified_spec.rb
initial_state_multiple_spec.rb
initial_state_spec.rb
inspection_multiple_spec.rb Fix tests for Localizer (#689) 2020-08-05 20:27:12 +05:30
inspection_spec.rb Fix tests for Localizer (#689) 2020-08-05 20:27:12 +05:30
invoker_spec.rb chore(invokers): Refactor callback invokers, add class-callbacks support 2018-06-19 21:11:56 +03:00
localizer_spec.rb Adds spec for #human_event_name to accept event object 2021-03-26 17:50:20 +05:30
memory_leak_spec.rb
multiple_transitions_that_differ_only_by_guard_spec.rb
namespaced_multiple_example_spec.rb
new_dsl_spec.rb
override_warning_spec.rb
readme_spec.rb
reloading_spec.rb
rspec_matcher_spec.rb handle InvalidTransition in transition_from matcher 2019-11-08 17:21:04 +05:30
simple_custom_example_spec.rb
simple_example_spec.rb Feature: Add permitted_transitions to group permitted event with state (#664) 2020-02-08 18:19:30 +05:30
simple_multiple_example_spec.rb
state_spec.rb Fix tests for Localizer (#689) 2020-08-05 20:27:12 +05:30
states_on_one_line_example_spec.rb
subclassing_multiple_spec.rb
subclassing_spec.rb
timestamps_spec.rb fix: timestamp will work with named machine 2021-04-23 14:29:09 +05:30
transition_spec.rb