File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 6
6
end
7
7
8
8
it "should raise a TypeError exception when it doesn't wrap a result set" do
9
- r = Mysql2 ::Result . new
10
- expect { r . count } . to raise_error ( TypeError )
11
- expect { r . fields } . to raise_error ( TypeError )
12
- expect { r . field_types } . to raise_error ( TypeError )
13
- expect { r . size } . to raise_error ( TypeError )
14
- expect { r . each } . to raise_error ( TypeError )
9
+ if RUBY_VERSION >= "3.1"
10
+ expect { Mysql2 ::Result . new } . to raise_error ( TypeError )
11
+ expect { Mysql2 ::Result . allocate } . to raise_error ( TypeError )
12
+ else
13
+ r = Mysql2 ::Result . new
14
+ expect { r . count } . to raise_error ( TypeError )
15
+ expect { r . fields } . to raise_error ( TypeError )
16
+ expect { r . field_types } . to raise_error ( TypeError )
17
+ expect { r . size } . to raise_error ( TypeError )
18
+ expect { r . each } . to raise_error ( TypeError )
19
+ end
15
20
end
16
21
17
22
it "should have included Enumerable" do
You can’t perform that action at this time.
0 commit comments