You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a field current_state instead of traditional state field for state machine
field :current_state, type: String
state_machine :current_state, :initial => :scheduled do
event :patient_arrived do
transition :scheduled => :waiting
end
event :patient_engaged do
transition :waiting => :engaged
end
event :patient_seen do
transition [:scheduled, :waiting, :engaged] => :seen
end
event :undo_arrived do
transition :waiting => :scheduled
end
end
It is throwing error
Failure/Error: it { should have_states :scheduled, :waiting, :engaged, :seen }
Expected state to allow states: scheduled, waiting, engaged, seen
However if i change my field from 'current_state' to 'state' my test case passes.
I could not find any documentation to handle this, is this an issue or is there some workaround
The text was updated successfully, but these errors were encountered:
I am using a field current_state instead of traditional state field for state machine
It is throwing error
Failure/Error: it { should have_states :scheduled, :waiting, :engaged, :seen }
Expected state to allow states: scheduled, waiting, engaged, seen
However if i change my field from 'current_state' to 'state' my test case passes.
I could not find any documentation to handle this, is this an issue or is there some workaround
The text was updated successfully, but these errors were encountered: