mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
16 lines
438 B
Ruby
16 lines
438 B
Ruby
require 'spec_helper'
|
|
|
|
describe StatesOnOneLineExample do
|
|
let(:example) { StatesOnOneLineExample.new }
|
|
describe 'on initialize' do
|
|
it 'should be in the initial state' do
|
|
expect(example.aasm(:one_line).current_state).to eql :initial
|
|
end
|
|
end
|
|
|
|
describe 'states' do
|
|
it 'should have all 3 states defined' do
|
|
expect(example.aasm(:one_line).states.map(&:name)).to eq [:initial, :first, :second]
|
|
end
|
|
end
|
|
end
|