mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Moved inheritance_spec test to subclassing_spec.
This commit is contained in:
parent
7e9d86902d
commit
816f5d1dc5
2 changed files with 12 additions and 18 deletions
|
@ -1,18 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'inheritance behavior' do
|
||||
let(:son) {Son.new}
|
||||
|
||||
it 'should be in the pending state' do
|
||||
son.aasm_current_state.should == :missing_details
|
||||
end
|
||||
|
||||
it 'should know how to respond to `may_add_details?`' do
|
||||
son.may_add_details?.should be_true
|
||||
end
|
||||
|
||||
it 'should not break if I call Son#update_state' do
|
||||
son.update_state
|
||||
son.aasm_current_state.should == :pending_details_confirmation
|
||||
end
|
||||
end
|
|
@ -1,6 +1,8 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'subclassing' do
|
||||
let(:son) {Son.new}
|
||||
|
||||
it 'should have the parent states' do
|
||||
Foo.aasm_states.each do |state|
|
||||
FooTwo.aasm_states.should include(state)
|
||||
|
@ -15,5 +17,15 @@ describe 'subclassing' do
|
|||
it "should have the same events as its parent" do
|
||||
Baz.aasm_events.should == Bar.aasm_events
|
||||
end
|
||||
|
||||
it 'should know how to respond to `may_add_details?`' do
|
||||
son.may_add_details?.should be_true
|
||||
end
|
||||
|
||||
it 'should not break if I call Son#update_state' do
|
||||
son.update_state
|
||||
son.aasm_current_state.should == :pending_details_confirmation
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue