Permalink
Browse files

Raise NotImplementedError for CardBehaviour#release

  • Loading branch information...
1 parent 66350b4 commit 7b3ac8e8de4dc2188991bad22c4ca9eb65d86eff @calebthompson committed Jul 4, 2012
Showing with 9 additions and 1 deletion.
  1. +5 −1 lib/demesne/behaviours/card_behaviour.rb
  2. +4 −0 spec/behaviours/card_behaviour_spec.rb
@@ -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
@@ -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([]) }
@@ -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.