[machinist-users] Blueprints for a state machine in different states by invoking events on the machine?

Skip to first unread message

Sohail Ahmed

Apr 20, 2010, 3:28:43 PM4/20/10
to Machinist Users
I've got a situation where I'd like to create a named blueprint for a
model called "Complaint" that is also a state machine (stonepath on
top of aasm if you're curious).

I'd like named blueprints for each of these states, but for integrity
of the tests, I'd like to invoke the model's event methods to
transition to the various states (applying all side effects to
maintain integrity - stubbing would become a chain of hairiness in my
use case).

Is there a way to:

1. Arbitrarily invoke code on a blueprint during it's construction or
after it's instantiated, in the blueprints file for a given model?
2. Have one blueprint build on a previous specifically named
blueprint, beyond the root unnamed blueprint?

I see mention of some test helpers for invoking association methods
outside of the blueprint, so I'm inferring that I'll have to just use
a special helper that can only bootstrap off the initial state

Any suggestions...I'm open to ideas!


You received this message because you are subscribed to the Google Groups "Machinist Users" group.
To post to this group, send email to machini...@googlegroups.com.
To unsubscribe from this group, send email to machinist-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/machinist-users?hl=en.

Reply all
Reply to author
0 new messages