mirror of
https://github.com/thoughtbot/factory_bot_rails.git
synced 2022-11-09 11:49:18 -05:00
Simplify the jdbc sqlite3 driver replacement
This commit is contained in:
parent
b34a554506
commit
b7f5c5d9d0
1 changed files with 2 additions and 7 deletions
|
@ -44,12 +44,7 @@ end
|
|||
|
||||
When /^I configure the database connection for the application$/ do
|
||||
if RUBY_PLATFORM =~ /java/
|
||||
overwrite_file "config/database.yml", <<-END
|
||||
development: &development
|
||||
adapter: jdbcsqlite3
|
||||
database: db/test.sqlite3
|
||||
test:
|
||||
<<: *development
|
||||
END
|
||||
contents = File.read File.join(File.dirname(__FILE__), '..', '..', 'tmp', 'aruba', 'testapp', 'config', 'database.yml')
|
||||
overwrite_file 'config/database.yml', contents.gsub('adapter: sqlite3', 'adapter: jdbcsqlite3')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue