mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Some specs for #aasm_events_for_current_state
This commit is contained in:
parent
32156165d4
commit
29304c70ae
2 changed files with 15 additions and 1 deletions
1
TODO
1
TODO
|
@ -9,6 +9,5 @@ Cool ideas from users:
|
||||||
|
|
||||||
* Support multiple state machines on one object (Chris Nelson)
|
* Support multiple state machines on one object (Chris Nelson)
|
||||||
* http://justbarebones.blogspot.com/2007/11/actsasstatemachine-enhancements.html (Chetan Patil)
|
* http://justbarebones.blogspot.com/2007/11/actsasstatemachine-enhancements.html (Chetan Patil)
|
||||||
* next_events_for_current_state (Nick Plante)
|
|
||||||
* transition logging (Artem Vasiliev)
|
* transition logging (Artem Vasiliev)
|
||||||
* timestamp column for state change on AR (Mike Ferrier)
|
* timestamp column for state change on AR (Mike Ferrier)
|
||||||
|
|
|
@ -107,3 +107,18 @@ describe AASM, '- persistence' do
|
||||||
foo.aasm_current_state
|
foo.aasm_current_state
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe AASM, '- getting events for a state' do
|
||||||
|
it '#aasm_events_for_current_state should use current state' do
|
||||||
|
foo = Foo.new
|
||||||
|
foo.should_receive(:aasm_current_state)
|
||||||
|
foo.aasm_events_for_current_state
|
||||||
|
end
|
||||||
|
|
||||||
|
it '#aasm_events_for_current_state should use aasm_events_for_state' do
|
||||||
|
foo = Foo.new
|
||||||
|
foo.stub!(:aasm_current_state).and_return(:foo)
|
||||||
|
foo.should_receive(:aasm_events_for_state).with(:foo)
|
||||||
|
foo.aasm_events_for_current_state
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue