Describe the bug
Since I've updated from mintest 5.2.7 to using minitest 6.0.1 the must_have_state assertions stopped working.
The workaround I've done is to put this into my test_helper.rb
module Minitest::Expectations
infect_an_assertion :assert_transitions_from, :must_transition_from, :do_not_flip
infect_an_assertion :refute_transitions_from, :wont_transition_from, :do_not_flip
infect_an_assertion :assert_transition_to_allowed, :must_allow_transition_to, :do_not_flip
infect_an_assertion :refute_transition_to_allowed, :wont_allow_transition_to, :do_not_flip
infect_an_assertion :assert_have_state, :must_have_state, :do_not_flip
infect_an_assertion :refute_have_state, :wont_have_state, :do_not_flip
infect_an_assertion :assert_event_allowed, :must_allow_event, :do_not_flip
infect_an_assertion :refute_event_allowed, :wont_allow_event, :do_not_flip
end
To Reproduce
Steps to reproduce the behavior:
- In a rails application with minitest >= 6
- install aasm and configure test/test_helper.rb according to the aasm README
- run a test that uses must_have_state expectation
- See error
NoMethodError: undefined method `must_have_state' for an instance of Minitest::Expectation
Expected behavior
Test runs without errors
Describe the bug
Since I've updated from mintest 5.2.7 to using minitest 6.0.1 the must_have_state assertions stopped working.
The workaround I've done is to put this into my test_helper.rb
To Reproduce
Steps to reproduce the behavior:
NoMethodError: undefined method `must_have_state' for an instance of Minitest::ExpectationExpected behavior
Test runs without errors