@@ -8,18 +8,18 @@ module ActiveRecord
8
8
specify "from_string" do
9
9
expect ( DatabaseAdapter . from_string ( "PostgreSQL" ) ) . to eql ( DatabaseAdapter ::PostgreSQL . new )
10
10
expect ( DatabaseAdapter . from_string ( "PostGIS" ) ) . to eql ( DatabaseAdapter ::PostgreSQL . new )
11
- expect ( DatabaseAdapter . from_string ( "MySQL2" ) ) . to eql ( DatabaseAdapter ::MySQL2 . new )
11
+ expect ( DatabaseAdapter . from_string ( "MySQL2" ) ) . to eql ( DatabaseAdapter ::MySQL . new )
12
12
expect ( DatabaseAdapter . from_string ( "SQLite" ) ) . to eql ( DatabaseAdapter ::SQLite . new )
13
13
end
14
14
15
15
specify "equality" do
16
- expect ( DatabaseAdapter ::PostgreSQL . new ) . not_to eql ( DatabaseAdapter ::MySQL2 . new )
16
+ expect ( DatabaseAdapter ::PostgreSQL . new ) . not_to eql ( DatabaseAdapter ::MySQL . new )
17
17
expect ( DatabaseAdapter ::PostgreSQL . new ) . not_to eql ( "postgresql" )
18
18
end
19
19
20
20
specify "adapter_name" do
21
21
expect ( DatabaseAdapter ::PostgreSQL . new . adapter_name ) . to eql ( "postgresql" )
22
- expect ( DatabaseAdapter ::MySQL2 . new . adapter_name ) . to eql ( "mysql2" )
22
+ expect ( DatabaseAdapter ::MySQL . new . adapter_name ) . to eql ( "mysql2" )
23
23
expect ( DatabaseAdapter ::SQLite . new . adapter_name ) . to eql ( "sqlite" )
24
24
end
25
25
@@ -40,13 +40,13 @@ module ActiveRecord
40
40
41
41
specify "hash" do
42
42
expect ( DatabaseAdapter ::PostgreSQL . new . hash ) . to eql ( DatabaseAdapter . hash ^ "postgresql" . hash )
43
- expect ( DatabaseAdapter ::MySQL2 . new . hash ) . to eql ( DatabaseAdapter . hash ^ "mysql2" . hash )
43
+ expect ( DatabaseAdapter ::MySQL . new . hash ) . to eql ( DatabaseAdapter . hash ^ "mysql2" . hash )
44
44
expect ( DatabaseAdapter ::SQLite . new . hash ) . to eql ( DatabaseAdapter . hash ^ "sqlite" . hash )
45
45
end
46
46
47
47
specify "child classes don't implement #from_string" do
48
48
expect { DatabaseAdapter ::PostgreSQL . from_string ( "postgresql" ) } . to raise_error ( NoMethodError )
49
- expect { DatabaseAdapter ::MySQL2 . from_string ( "mysql2" ) } . to raise_error ( NoMethodError )
49
+ expect { DatabaseAdapter ::MySQL . from_string ( "mysql2" ) } . to raise_error ( NoMethodError )
50
50
expect { DatabaseAdapter ::SQLite . from_string ( "sqlite" ) } . to raise_error ( NoMethodError )
51
51
end
52
52
@@ -56,16 +56,16 @@ module ActiveRecord
56
56
57
57
context "data type verification" do
58
58
specify "MySQL supports binary" do
59
- expect ( DatabaseAdapter ::MySQL2 . new ( "binary" ) . data_type ) . to eq ( "binary" )
59
+ expect ( DatabaseAdapter ::MySQL . new ( "binary" ) . data_type ) . to eq ( "binary" )
60
60
end
61
61
62
62
specify "MySQL supports json" do
63
- expect ( DatabaseAdapter ::MySQL2 . new ( "json" ) . data_type ) . to eq ( "json" )
63
+ expect ( DatabaseAdapter ::MySQL . new ( "json" ) . data_type ) . to eq ( "json" )
64
64
end
65
65
66
66
specify "MySQL doesn't support jsonb" do
67
- expect { DatabaseAdapter ::MySQL2 . new ( "jsonb" ) } . to raise_error InvalidDataTypeForAdapter ,
68
- "MySQL2 doesn't support \" jsonb\" . Supported types are: binary, json."
67
+ expect { DatabaseAdapter ::MySQL . new ( "jsonb" ) } . to raise_error InvalidDataTypeForAdapter ,
68
+ "MySQL doesn't support \" jsonb\" . Supported types are: binary, json."
69
69
end
70
70
71
71
specify "PostgreSQL supports binary" do
0 commit comments