1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/spec
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
..
generators Fix specs, rename job model to work 2018-11-15 14:48:31 +05:30
models 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
spec_helpers Fix mongoid specs by adding require in mongoid specs (#786) 2022-07-22 19:46:23 +05:30
unit Cast string to symbol in fire/fire!, and fix deceptive error class and message (#788) 2022-07-27 15:28:17 +05:30
database.rb add specs 2021-03-25 14:06:04 +05:30
database.yml using real database connections for testing to reduce dependency on Rails version (previously mocked away ActiveRecord connection, which is not used in Rails 3.1 anymore) 2011-08-31 23:49:09 +02:00
en.yml Fix tests for Localizer (#689) 2020-08-05 20:27:12 +05:30
localizer_test_model_deprecated_style.yml Adds specs for state#display_name for localization 2020-10-15 14:22:31 +05:30
localizer_test_model_new_style.yml Adds specs for state#display_name for localization 2020-10-15 14:22:31 +05:30
spec_helper.rb Fix tests for Localizer (#689) 2020-08-05 20:27:12 +05:30