Permalink
Browse files

add spec

  • Loading branch information...
1 parent 3448059 commit 98acb05b36d5734a95b740a05d9c269d33e218ca @qqshfox qqshfox committed Oct 25, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 spec/mysql2_spec.rb
View
@@ -107,4 +107,17 @@
end
end
+ it "errback should not catch exception thrown from callback" do
+ class ErrbackShouldNotCatchThis < Exception; end
+ proc {
+ EM.synchrony do
+ db = Mysql2::EM::Client.new
+ res = db.query QUERY
+ raise ErrbackShouldNotCatchThis.new("errback should not catch this")
+
+ EventMachine.stop
+ end
+ }.should raise_error(ErrbackShouldNotCatchThis)
+ end
+
end

0 comments on commit 98acb05

Please sign in to comment.