1
0
Fork 0
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:
Matt Jankowski 2012-12-19 14:31:49 -05:00
parent b34a554506
commit b7f5c5d9d0

View file

@ -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