Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for wildcard transitions. #32

Merged
merged 3 commits into from
Mar 30, 2018
Merged

Conversation

joaomdmoura
Copy link
Owner

Related to #17

This feature will enable people to add transitions that can be
made from any state, pretty useful for use cases where a 'canceled'
state might exist, you can easily declare it as a valid transition from
any state using a wildcard "*" => "next_state"

This feature will enable people to add transitions that can be
made from any state, pretty useful for use cases where a 'canceled'
state might exist, you can easily declare it as a valid transition from
any state using a wildcard "*" => "next_state"
@joaomdmoura joaomdmoura self-assigned this Mar 30, 2018
assert {:ok, %TestStruct{state: "canceled"}} = Machinery.transition_to(completed_struct, TestStateMachine, "canceled")
end


Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no more than 1 consecutive blank lines.

Repository owner deleted a comment from coveralls Mar 30, 2018
@joaomdmoura joaomdmoura merged commit 7fab449 into master Mar 30, 2018
@joaomdmoura joaomdmoura deleted the transition-from-all branch March 30, 2018 13:54
}
assert Transition.declared_transition?(transitions, "created", "completed")
assert Transition.declared_transition?(transitions, "created", "canceled")
assert Transition.declared_transition?(transitions, "completed", "canceled")
end
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

about this last "end", is it closing a "do" statement before line 5 or something ?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, closing the module itself , the module MachineryTest.TransitionTes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants