Skip to content

Commit

Permalink
Moved inheritance_spec test to subclassing_spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernesto Tagwerker committed Apr 30, 2013
1 parent 7e9d869 commit 816f5d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
18 changes: 0 additions & 18 deletions spec/unit/inheritance_spec.rb

This file was deleted.

12 changes: 12 additions & 0 deletions spec/unit/subclassing_spec.rb
@@ -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)
Expand All @@ -15,5 +17,15 @@
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

0 comments on commit 816f5d1

Please sign in to comment.