1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot_rails.git synced 2022-11-09 11:49:18 -05:00

Use compatible sqlite3 version in test application

Currently, the `sqlite3` in `Gemfile` generated by `rails new` is not
compatible with Rails.

To solve this issue, modified it to use compatible `sqlite3` using
template.
Ref: https://github.com/rails/rails/issues/35161
This commit is contained in:
yuuji.yaginuma 2019-02-06 19:00:06 +09:00 committed by Daniel Colson
parent df44185167
commit e6509920a6
4 changed files with 4 additions and 3 deletions

View file

@ -3,7 +3,7 @@ Feature:
I would like the Factory Bot Rails gem to configure Factory Bot as the fixture replacement.
Background:
Given I successfully run `bundle exec rails new testapp`
Given I successfully run `bundle exec rails new testapp -m ../../features/support/rails_template`
And I cd to "testapp"
And I add "factory_bot_rails" from this project as a dependency

View file

@ -4,7 +4,7 @@ Feature:
I would like to use factory_bot_rails generators.
Background:
Given I successfully run `bundle exec rails new testapp`
Given I successfully run `bundle exec rails new testapp -m ../../features/support/rails_template`
And I cd to "testapp"
And I add "factory_bot_rails" from this project as a dependency
And I run `bundle install` with a clean environment

View file

@ -1,7 +1,7 @@
Feature: automatically load factory definitions
Background:
When I successfully run `bundle exec rails new testapp`
When I successfully run `bundle exec rails new testapp -m ../../features/support/rails_template`
And I cd to "testapp"
And I add "factory_bot_rails" from this project as a dependency
And I add "test-unit" as a dependency

View file

@ -0,0 +1 @@
gsub_file "Gemfile", /^gem 'sqlite3'$/, 'gem "sqlite3", "~> 1.3.6"'