mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
17 lines
546 B
Ruby
17 lines
546 B
Ruby
|
require 'spec_helper'
|
||
|
|
||
|
describe "edge cases" do
|
||
|
describe "for classes with multiple state machines" do
|
||
|
it "allows accessing a multiple state machine class without state machine name" do
|
||
|
# it's like starting to define a new state machine within the
|
||
|
# requested class
|
||
|
expect(SimpleMultipleExample.aasm.states.map(&:name)).to be_empty
|
||
|
end
|
||
|
|
||
|
it "do not know yet" do
|
||
|
example = ComplexExampleMultiple.new
|
||
|
expect { example.aasm.states.inspect }.to raise_error(AASM::UnknownStateMachineError)
|
||
|
end
|
||
|
end
|
||
|
end
|