Skip to content

Commit

Permalink
Raise NotImplementedError for CardBehaviour#release
Browse files Browse the repository at this point in the history
  • Loading branch information
calebhearth committed Jul 4, 2012
1 parent 66350b4 commit 7b3ac8e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/demesne/behaviours/card_behaviour.rb
Expand Up @@ -10,7 +10,11 @@ def behaviours
end

def name
raise NotImplementedError
raise NotImplementedError, "Override ::name in card implementation."
end

def release
raise NotImplementedError, "Override ::release in card implementation."
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions spec/behaviours/card_behaviour_spec.rb
Expand Up @@ -11,6 +11,7 @@

it { should respond_to(:behaviours) }
it { should respond_to(:name) }
it { should respond_to(:release) }
describe "::behaviours" do
subject { @test_card.behaviours }
it { should eq([]) }
Expand All @@ -19,4 +20,7 @@
describe "::name" do
specify { lambda { @test_card.name }.should raise_error(NotImplementedError) }
end
describe "::release" do
specify { lambda { @test_card.release }.should raise_error(NotImplementedError) }
end
end

0 comments on commit 7b3ac8e

Please sign in to comment.