1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/spec/unit/event_naming_spec.rb

17 lines
487 B
Ruby
Raw Normal View History

require 'spec_helper'
describe "event naming" do
let(:state_machine) { StateMachineWithFailedEvent.new }
it "allows an event of failed without blowing the stack aka stack level too deep" do
state_machine.failed
expect { state_machine.failed }.to raise_error(AASM::InvalidTransition)
end
2016-01-07 22:08:43 -05:00
it "allows send as event name" do
expect(state_machine.aasm.current_state).to eq :init
state_machine.send
expect(state_machine.aasm.current_state).to eq :sent
end
end