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

Add skip options for test app creation (#371)

Prior to this commit the tests generated a full rails app, but didn't need many of the libraries included by default. Unneeded gems make the test suite slower, and increase the chance of getting errors when new versions of each gem come out.
This commit is contained in:
Alex Golubenko 2020-04-04 16:12:04 +03:00 committed by GitHub
parent 49ed76c58c
commit 4c63a128a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 41 deletions

View file

@ -2,60 +2,40 @@
appraise "rails5.0" do
gem "sqlite3", "~> 1.3.6"
gem "byebug"
gem "jbuilder", "~> 2.5"
gem "listen", "~> 3.0.5"
gem "puma", "~> 3.0"
gem "rails", "~> 5.0.7", ">= 5.0.7.2"
gem "sass-rails", "~> 5.0"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "uglifier", ">= 1.3.0"
gem "web-console", ">= 3.3.0", group: :development
end
appraise "rails5.1" do
gem "byebug"
gem "capybara", ">= 2.15"
gem "jbuilder", "~> 2.5"
gem "listen", ">= 3.0.5", "< 3.2"
gem "puma", "~> 3.7"
gem "rails", "~> 5.1.7"
gem "sass-rails", "~> 5.0"
gem "selenium-webdriver"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "sqlite3", "~> 1.3.6"
gem "web-console", ">= 3.3.0", group: :development
end
appraise "rails5.2" do
gem "byebug"
gem "capybara", ">= 2.15"
gem "chromedriver-helper"
gem "jbuilder", "~> 2.5"
gem "listen", ">= 3.0.5", "< 3.2"
gem "puma", "~> 3.11"
gem "rails", "~> 5.2.4", ">= 5.2.4.2"
gem "sass-rails", "~> 5.0"
gem "selenium-webdriver"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "sqlite3", "~> 1.3.6"
gem "web-console", ">= 3.3.0", group: :development
end
appraise "rails6.0" do
gem "byebug"
gem "capybara", ">= 2.15"
gem "jbuilder", "~> 2.7"
gem "listen", ">= 3.0.5", "< 3.2"
gem "puma", "~> 4.1"
gem "rails", "~> 6.0.2", ">= 6.0.2.2"
gem "sass-rails", ">= 6"
gem "selenium-webdriver"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "sqlite3", "~> 1.4"
gem "web-console", ">= 3.3.0", group: :development
gem "webdrivers"
end

View file

@ -1,5 +1,16 @@
When /^I create a new rails application$/ do
options = "--skip-bootsnap --skip-javascript --skip-bundle"
options =
%w[
--api
--skip-bootsnap
--skip-javascript
--skip-action-mailer
--skip-active-storage
--skip-action-cable
--skip-sprockets
--skip-bundle
].join(" ")
template = "-m ../../features/support/rails_template"
result = run_command("bundle exec rails new test_app #{options} #{template}")

View file

@ -10,14 +10,11 @@ gem "rspec-rails"
gem "rubocop", "0.54", require: false
gem "sqlite3", "~> 1.3.6"
gem "byebug"
gem "jbuilder", "~> 2.5"
gem "listen", "~> 3.0.5"
gem "puma", "~> 3.0"
gem "rails", "~> 5.0.7", ">= 5.0.7.2"
gem "sass-rails", "~> 5.0"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "uglifier", ">= 1.3.0"
gem "web-console", ">= 3.3.0", group: :development
gemspec name: "factory_bot_rails", path: "../"

View file

@ -9,16 +9,11 @@ gem "rake"
gem "rspec-rails"
gem "rubocop", "0.54", require: false
gem "byebug"
gem "capybara", ">= 2.15"
gem "jbuilder", "~> 2.5"
gem "listen", ">= 3.0.5", "< 3.2"
gem "puma", "~> 3.7"
gem "rails", "~> 5.1.7"
gem "sass-rails", "~> 5.0"
gem "selenium-webdriver"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "sqlite3", "~> 1.3.6"
gem "web-console", ">= 3.3.0", group: :development
gemspec name: "factory_bot_rails", path: "../"

View file

@ -9,17 +9,11 @@ gem "rake"
gem "rspec-rails"
gem "rubocop", "0.54", require: false
gem "byebug"
gem "capybara", ">= 2.15"
gem "chromedriver-helper"
gem "jbuilder", "~> 2.5"
gem "listen", ">= 3.0.5", "< 3.2"
gem "puma", "~> 3.11"
gem "rails", "~> 5.2.4", ">= 5.2.4.2"
gem "sass-rails", "~> 5.0"
gem "selenium-webdriver"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "sqlite3", "~> 1.3.6"
gem "web-console", ">= 3.3.0", group: :development
gemspec name: "factory_bot_rails", path: "../"

View file

@ -9,17 +9,11 @@ gem "rake"
gem "rspec-rails"
gem "rubocop", "0.54", require: false
gem "byebug"
gem "capybara", ">= 2.15"
gem "jbuilder", "~> 2.7"
gem "listen", ">= 3.0.5", "< 3.2"
gem "puma", "~> 4.1"
gem "rails", "~> 6.0.2", ">= 6.0.2.2"
gem "sass-rails", ">= 6"
gem "selenium-webdriver"
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "sqlite3", "~> 1.4"
gem "web-console", ">= 3.3.0", group: :development
gem "webdrivers"
gemspec name: "factory_bot_rails", path: "../"