Skip to content

Commit

Permalink
Fix ActiveRecord adapters not being loaded for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
aldesantis committed Dec 14, 2019
1 parent 93f6953 commit e4bca8c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,12 @@ gemspec
gem 'solidus_extension_dev_tools', github: 'solidusio-contrib/solidus_extension_dev_tools'
gem 'sprockets', '~> 3'
gem 'sprockets-rails'
gem 'sqlite3'

case ENV['DB']
when 'postgresql'
gem 'pg'
when 'mysql'
gem 'mysql2'
else
gem 'sqlite3'
end
12 changes: 12 additions & 0 deletions spec/support/dummy_app/database.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<% if ENV['DB'] == 'postgresql' %>
test:
adapter: postgresql
database: circle_test
username: root
<% elsif ENV['DB'] == 'mysql' %>
test:
adapter: mysql2
database: circle_test
username: root
<% else %>
test:
adapter: sqlite3
database: ':memory:'
timeout: 10000
<% end %>

0 comments on commit e4bca8c

Please sign in to comment.