From cfaf554a3e73935b8612e1a003d89fff4c21ac7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 14 May 2012 18:37:52 +0200 Subject: specs: add NoMethodError when receive_p is not overriden --- spec/door_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/door_spec.rb b/spec/door_spec.rb index 72e28a9..254d59c 100644 --- a/spec/door_spec.rb +++ b/spec/door_spec.rb @@ -27,6 +27,15 @@ describe EvenDoors::Door do (p0===p2).should be_true end # + it "NoMethodError when receive_p not overridden" do + class Door0 < EvenDoors::Door + end + f = Fake.new 'fake', @spin + d0 = Door0.new 'door0', f + p0 = d0.require_p EvenDoors::Particle + lambda { d0.process_p p0 }.should raise_error(NoMethodError) + end + # it "send_p, send_sys_p, release_p and release of lost particles" do class Door0 < EvenDoors::Door def receive_p p -- cgit v1.1-2-g2b99