From 816f5d1dc59315f2f7abcaa119cfaa36e90f9d54 Mon Sep 17 00:00:00 2001 From: Ernesto Tagwerker Date: Tue, 30 Apr 2013 15:17:50 +0200 Subject: [PATCH] Moved inheritance_spec test to subclassing_spec. --- spec/unit/inheritance_spec.rb | 18 ------------------ spec/unit/subclassing_spec.rb | 12 ++++++++++++ 2 files changed, 12 insertions(+), 18 deletions(-) delete mode 100644 spec/unit/inheritance_spec.rb diff --git a/spec/unit/inheritance_spec.rb b/spec/unit/inheritance_spec.rb deleted file mode 100644 index 550caa40..00000000 --- a/spec/unit/inheritance_spec.rb +++ /dev/null @@ -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 \ No newline at end of file diff --git a/spec/unit/subclassing_spec.rb b/spec/unit/subclassing_spec.rb index b71d9f0b..7ceb44d1 100644 --- a/spec/unit/subclassing_spec.rb +++ b/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) @@ -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