Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add spec

  • Loading branch information...
commit 98acb05b36d5734a95b740a05d9c269d33e218ca 1 parent 3448059
Hanfei Shen qqshfox authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 spec/mysql2_spec.rb
13 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
Please sign in to comment.
Something went wrong with that request. Please try again.