state_machines-activerecord
state_machines-activerecord copied to clipboard
Transition specs fails when switching to state_machines-activerecord
I started with state_machines, and wrote a few specs about my workflow with state_machines-rspec.
When I decided later to switch to state_machines-activerecord, my transition specs failed, and I can't see why. That kind of spec:
it { is_expected.to transition_from :idle, to_state: :received, on_event: :receive }
generates that kind of error:
Failure/Error:
is_expected.to transition_from :idle, to_state: :received,
on_event: :receive
Expected to be able to transition state from: idle to: received, on_event: receive
which is weird, considering I have this code in my model:
event :receive do
transition idle: :received
end
Is there something I should know about the config of the rspec gem?
(I'm building a Rails 5.1 app)
I'm not an user of RSpec so I recommend you to open this issue in the RSpec adapter since they would be more likely to work on it.