|
6 | 6 | @client = Mysql2::Client.new(DatabaseCredentials['root'].merge(:encoding => "utf8"))
|
7 | 7 | end
|
8 | 8 |
|
9 |
| - # it "should create a statement" do |
10 |
| - # statement = nil |
11 |
| - # lambda { statement = @client.prepare 'SELECT 1' }.should_not raise_error |
12 |
| - # statement.should be_kind_of Mysql2::Statement |
13 |
| - # end |
| 9 | + it "should create a statement" do |
| 10 | + statement = nil |
| 11 | + lambda { statement = @client.prepare 'SELECT 1' }.should_not raise_error |
| 12 | + statement.should be_kind_of Mysql2::Statement |
| 13 | + end |
14 | 14 |
|
15 |
| - # it "should raise an exception when server disconnects" do |
16 |
| - # @client.close |
17 |
| - # lambda { @client.prepare 'SELECT 1' }.should raise_error(Mysql2::Error) |
18 |
| - # end |
| 15 | + it "should raise an exception when server disconnects" do |
| 16 | + @client.close |
| 17 | + lambda { @client.prepare 'SELECT 1' }.should raise_error(Mysql2::Error) |
| 18 | + end |
19 | 19 |
|
20 |
| - # it "should tell us the param count" do |
21 |
| - # statement = @client.prepare 'SELECT ?, ?' |
22 |
| - # statement.param_count.should == 2 |
| 20 | + it "should tell us the param count" do |
| 21 | + statement = @client.prepare 'SELECT ?, ?' |
| 22 | + statement.param_count.should == 2 |
23 | 23 |
|
24 |
| - # statement2 = @client.prepare 'SELECT 1' |
25 |
| - # statement2.param_count.should == 0 |
26 |
| - # end |
| 24 | + statement2 = @client.prepare 'SELECT 1' |
| 25 | + statement2.param_count.should == 0 |
| 26 | + end |
27 | 27 |
|
28 |
| - # it "should tell us the field count" do |
29 |
| - # statement = @client.prepare 'SELECT ?, ?' |
30 |
| - # statement.field_count.should == 2 |
| 28 | + it "should tell us the field count" do |
| 29 | + statement = @client.prepare 'SELECT ?, ?' |
| 30 | + statement.field_count.should == 2 |
| 31 | + |
| 32 | + statement2 = @client.prepare 'SELECT 1' |
| 33 | + statement2.field_count.should == 1 |
| 34 | + end |
31 | 35 |
|
32 | 36 | # statement2 = @client.prepare 'SELECT 1'
|
33 | 37 | # statement2.field_count.should == 1
|
|
0 commit comments