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
2016-01-08 16:08:43 +13:00

16 lines
487 B
Ruby

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
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