Last active
December 20, 2015 06:49
-
-
Save simi/6088534 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| context "Multiple results sets" do | |
| before(:each) do | |
| @multi_client = Mysql2::Client.new(DatabaseCredentials['root'].merge(:flags => Mysql2::Client::MULTI_STATEMENTS)) | |
| end | |
| it "should raise an exception when one of multiple statements fails" do | |
| @multi_client.query("SELECT 1 as 'set_1'; SELECT * FROM invalid_table_name;") | |
| lambda { | |
| @multi_client.next_result | |
| }.should raise_error(Mysql2::Error) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment