Skip to content

Commit d3c55d2

Browse files
committed
re-enable more specs
1 parent e69edb3 commit d3c55d2

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

spec/mysql2/statement_spec.rb

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,32 @@
66
@client = Mysql2::Client.new(DatabaseCredentials['root'].merge(:encoding => "utf8"))
77
end
88

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
1414

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
1919

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
2323

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
2727

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
3135

3236
# statement2 = @client.prepare 'SELECT 1'
3337
# statement2.field_count.should == 1

0 commit comments

Comments
 (0)