Permalink
Browse files

Added specs for #error! and #stop!.

  • Loading branch information...
1 parent 3ba343b commit 52c888f5ee87071b9737eb00de3d144b687f35ee @postmodern committed Aug 12, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 spec/instance_spec.rb
View
@@ -77,6 +77,18 @@
end
end
+ describe "#stop!" do
+ it "should throw :return, 1" do
+ lambda { subject.stop! }.should throw_symbol(:return,1)
+ end
+ end
+
+ describe "#error!" do
+ it "should throw :return, -1" do
+ lambda { subject.error! }.should throw_symbol(:return,-1)
+ end
+ end
+
describe "callbacks" do
describe "on_message_begin" do
include_examples "callback", {:on_message_begin => :on_path}

0 comments on commit 52c888f

Please sign in to comment.