mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Remove extract_options!, active_support dependency from minitest assertions
This commit is contained in:
parent
b9c9a4e738
commit
e03f8d9afe
1 changed files with 3 additions and 3 deletions
|
@ -1,13 +1,13 @@
|
|||
module Minitest::Assertions
|
||||
def assert_transitions_from(object, from_state, *args)
|
||||
options = args.extract_options!
|
||||
options = args.first
|
||||
options[:on] ||= :default
|
||||
assert _transitions_from?(object, from_state, args, options),
|
||||
"Expected transition state to :#{options[:to]} from :#{from_state} on event :#{options[:on_event]}, (on :#{options[:on]})"
|
||||
end
|
||||
|
||||
def refute_transitions_from(object, from_state, *args)
|
||||
options = args.extract_options!
|
||||
options = args.first
|
||||
options[:on] ||= :default
|
||||
refute _transitions_from?(object, from_state, args, options),
|
||||
"Expected transition state to :#{options[:to]} from :#{from_state} on event :#{options[:on_event]}, (on :#{options[:on]})"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue