Build Log
(in /home/build/repos/jondistad/aasm)
Conversation description
- .aasm_states should contain all of the states
AASM - class level definitions
- should define a class level aasm_initial_state() method on its including class
- should define a class level aasm_state() method on its including class
- should define a class level aasm_event() method on its including class
- should define a class level aasm_states() method on its including class
- should define a class level aasm_states_for_select() method on its including class
- should define a class level aasm_events() method on its including class
AASM - aasm_states_for_select
- should return a select friendly array of states in the form of [['Friendly name', 'state_name']]
AASM - instance level definitions
- should define a state querying instance method on including class
- should define an event! inance method
AASM - initial states
- should set the initial state
- #open? should be initially true
- #closed? should be initially false
- should use the first state defined if no initial state is given
AASM - event firing with persistence
- should fire the Event
- should update the current state
- should call the success callback if one was provided
- should attempt to persist if aasm_write_state is defined
- should return true if aasm_write_state is defined and returns true
- should return false if aasm_write_state is defined and returns false
- should not update the aasm_current_state if the write fails
AASM - event firing without persistence
- should fire the Event
- should update the current state
- should attempt to persist if aasm_write_state is defined
AASM - persistence
- should read the state if it has not been set and aasm_read_state is defined
AASM - getting events for a state
- #aasm_events_for_current_state should use current state
- #aasm_events_for_current_state should use aasm_events_for_state
AASM - event callbacks
- should call aasm_event_fired if defined and successful for bang fire
- should not call aasm_event_fired if defined but persist fails for bang fire
- should not call aasm_event_failed if defined and persist fails for bang fire
- should call aasm_event_fired if defined and successful for non-bang fire
- should call aasm_event_failed if defined and transition failed for bang fire
- should call aasm_event_failed if defined and transition failed for non-bang fire
AASM - state actions
- should call enter when entering state
- should call exit when exiting state
Baz
- should have the same states as it's parent
- should have the same events as it's parent
ChetanPatil
- should transition to specified next state (sleeping to showering)
- should transition to specified next state (sleeping to working)
- should transition to default (first or showering) state
- should transition to default state when on_transition invoked
- should call on_transition method with args
- should call on_transition proc
AASM::SupportingClasses::StateTransition
- should set from, to, and opts attr readers
- should pass equality check if from and to are the same
- should fail equality check if from are not the same
- should fail equality check if to are not the same
AASM::SupportingClasses::StateTransition - when performing guard checks
- should return true of there is no guard
- should call the method on the object if guard is a symbol
- should call the method on the object if guard is a string
- should call the proc passing the object if the guard is a proc
AASM::SupportingClasses::State
- should set the name
- should set the options and expose them as options
- should be equal to a symbol of the same name
- should be equal to a State of the same name
- should send a message to the record for an action if the action is present as a symbol
- should send a message to the record for an action if the action is present as a string
- should call a proc, passing in the record for an action if the action is present
AASM::SupportingClasses::Event
- should set the name
- should set the success option
- should create StateTransitions
AASM::SupportingClasses::Event when firing an event
- should raise an AASM::InvalidTransition error if the transitions are empty
- should return the state of the first matching transition it finds
AASM::SupportingClasses::Event when executing the success callback
- should send the success callback if it's a symbol
- should send the success callback if it's a string
- should call each success callback if passed an array of strings and/or symbols
- should call the success callback if it's a proc
FooBar class methods
- should include AASM::Persistence::ActiveRecordPersistence
- should include AASM::Persistence::ActiveRecordPersistence::InstanceMethods
- should include AASM::Persistence::ActiveRecordPersistence::ReadState
- should include AASM::Persistence::ActiveRecordPersistence::WriteState
- should include AASM::Persistence::ActiveRecordPersistence::WriteStateWithoutPersistence
Fi class methods
- should include AASM::Persistence::ActiveRecordPersistence
- should include AASM::Persistence::ActiveRecordPersistence::InstanceMethods
- should not include AASM::Persistence::ActiveRecordPersistence::ReadState
- should include AASM::Persistence::ActiveRecordPersistence::WriteState
- should include AASM::Persistence::ActiveRecordPersistence::WriteStateWithoutPersistence
Fo class methods
- should include AASM::Persistence::ActiveRecordPersistence
- should include AASM::Persistence::ActiveRecordPersistence::InstanceMethods
- should include AASM::Persistence::ActiveRecordPersistence::ReadState
- should not include AASM::Persistence::ActiveRecordPersistence::WriteState
- should include AASM::Persistence::ActiveRecordPersistence::WriteStateWithoutPersistence
Fum class methods
- should include AASM::Persistence::ActiveRecordPersistence
- should include AASM::Persistence::ActiveRecordPersistence::InstanceMethods
- should include AASM::Persistence::ActiveRecordPersistence::ReadState
- should include AASM::Persistence::ActiveRecordPersistence::WriteState
- should not include AASM::Persistence::ActiveRecordPersistence::WriteStateWithoutPersistence
FooBar instance methods
- should respond to aasm read state when not previously defined
- should respond to aasm write state when not previously defined
- should respond to aasm write state without persistence when not previously defined
- should return the initial state when new and the aasm field is nil
- should return the aasm column when new and the aasm field is not nil
- should return the aasm column when not new and the aasm_column is not nil
- should allow a nil state
- should have aasm_ensure_initial_state
- should call aasm_ensure_initial_state on validation before create
- should call aasm_ensure_initial_state on validation before create
Beavers
- should have the same states as it's parent
- should have the same events as it's parent
- should have the same column as it's parent
Finished in 0.367247 seconds
100 examples, 0 failures