mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
add transition specs
This commit is contained in:
parent
b73e1b3fca
commit
b318433361
1 changed files with 4 additions and 2 deletions
|
@ -296,13 +296,15 @@ describe 'current event' do
|
|||
end
|
||||
|
||||
describe "when calling events with fire/fire!" do
|
||||
it "fire should populate aasm.current_event" do
|
||||
it "fire should populate aasm.current_event and transition (sleeping to showering)" do
|
||||
pe.aasm.fire(:wakeup)
|
||||
expect(pe.aasm.current_event).to eq :wakeup
|
||||
expect(pe.aasm.current_state).to eq :showering
|
||||
end
|
||||
it "fire! should populate aasm.current_event" do
|
||||
it "fire! should populate aasm.current_event and transition (sleeping to showering)" do
|
||||
pe.aasm.fire!(:wakeup)
|
||||
expect(pe.aasm.current_event).to eq :wakeup!
|
||||
expect(pe.aasm.current_state).to eq :showering
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue