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

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