Skip to content

Commit f458536

Browse files
Update for trilogy (#707)
1 parent b38eec7 commit f458536

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

lib/database_cleaner/spec/database_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module DatabaseCleaner
44
module Spec
55
class DatabaseHelper < Struct.new(:db)
66
def self.with_all_dbs &block
7-
%w[mysql2 sqlite3 postgres].map(&:to_sym).each do |db|
7+
%w[mysql2 sqlite3 postgres trilogy].map(&:to_sym).each do |db|
88
yield new(db)
99
end
1010
end
@@ -43,7 +43,7 @@ def load_schema
4343
id_column = case db
4444
when :sqlite3
4545
"id INTEGER PRIMARY KEY AUTOINCREMENT"
46-
when :mysql2
46+
when :mysql2, :trilogy
4747
"id INTEGER PRIMARY KEY AUTO_INCREMENT"
4848
when :postgres
4949
"id SERIAL PRIMARY KEY"

spec/support/sample.config.yml

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ mysql2:
77
port: 3306
88
encoding: utf8
99

10+
trilogy:
11+
adapter: trilogy
12+
database: database_cleaner_test
13+
username: root
14+
password:
15+
host: 127.0.0.1
16+
port: 3306
17+
encoding: utf8
18+
1019
postgres:
1120
adapter: postgresql
1221
database: database_cleaner_test

0 commit comments

Comments
 (0)