mirror of
https://github.com/thoughtbot/factory_bot_rails.git
synced 2022-11-09 11:49:18 -05:00
Skip Spring version 2.1.1 (#389)
* Skip Spring version 2.1.1 Changes introduced in spring 2.1.1 (https://github.com/rails/spring/pull/621) are breaking some tests. That change was reverted in https://github.com/rails/spring/pull/629, but hasn't been released yet. Until #629 is released, this PR skips Spring version 2.1.1. * Bump to latest standard to match CI We are using the latest standard on CI. This bumps the version in the dev Gemfile to match, and fixes one violation. Co-authored-by: Daniel J. Colson <daniel.colson@hey.com>
This commit is contained in:
parent
9f5b5fc940
commit
9de5e2b765
9 changed files with 35 additions and 32 deletions
|
@ -4,7 +4,7 @@ appraise "rails5.0" do
|
||||||
gem "listen", "~> 3.0.5"
|
gem "listen", "~> 3.0.5"
|
||||||
gem "puma", "~> 3.0"
|
gem "puma", "~> 3.0"
|
||||||
gem "rails", "~> 5.0.7", ">= 5.0.7.2"
|
gem "rails", "~> 5.0.7", ">= 5.0.7.2"
|
||||||
gem "spring"
|
gem "spring", "!= 2.1.1"
|
||||||
gem "spring-watcher-listen", "~> 2.0.0"
|
gem "spring-watcher-listen", "~> 2.0.0"
|
||||||
gem "sqlite3", "~> 1.3.6"
|
gem "sqlite3", "~> 1.3.6"
|
||||||
end
|
end
|
||||||
|
@ -14,7 +14,7 @@ appraise "rails5.1" do
|
||||||
gem "listen", ">= 3.0.5", "< 3.2"
|
gem "listen", ">= 3.0.5", "< 3.2"
|
||||||
gem "puma", "~> 3.7"
|
gem "puma", "~> 3.7"
|
||||||
gem "rails", "~> 5.1.7"
|
gem "rails", "~> 5.1.7"
|
||||||
gem "spring"
|
gem "spring", "!= 2.1.1"
|
||||||
gem "spring-watcher-listen", "~> 2.0.0"
|
gem "spring-watcher-listen", "~> 2.0.0"
|
||||||
gem "sqlite3", "~> 1.3.6"
|
gem "sqlite3", "~> 1.3.6"
|
||||||
end
|
end
|
||||||
|
@ -24,7 +24,7 @@ appraise "rails5.2" do
|
||||||
gem "listen", ">= 3.0.5", "< 3.2"
|
gem "listen", ">= 3.0.5", "< 3.2"
|
||||||
gem "puma", "~> 3.11"
|
gem "puma", "~> 3.11"
|
||||||
gem "rails", "~> 5.2.4", ">= 5.2.4.2"
|
gem "rails", "~> 5.2.4", ">= 5.2.4.2"
|
||||||
gem "spring"
|
gem "spring", "!= 2.1.1"
|
||||||
gem "spring-watcher-listen", "~> 2.0.0"
|
gem "spring-watcher-listen", "~> 2.0.0"
|
||||||
gem "sqlite3", "~> 1.3.6"
|
gem "sqlite3", "~> 1.3.6"
|
||||||
end
|
end
|
||||||
|
@ -34,7 +34,7 @@ appraise "rails6.0" do
|
||||||
gem "listen", "~> 3.2"
|
gem "listen", "~> 3.2"
|
||||||
gem "puma", "~> 4.1"
|
gem "puma", "~> 4.1"
|
||||||
gem "rails", "~> 6.0.2", ">= 6.0.2.2"
|
gem "rails", "~> 6.0.2", ">= 6.0.2.2"
|
||||||
gem "spring"
|
gem "spring", "!= 2.1.1"
|
||||||
gem "spring-watcher-listen", "~> 2.0.0"
|
gem "spring-watcher-listen", "~> 2.0.0"
|
||||||
gem "sqlite3", "~> 1.4"
|
gem "sqlite3", "~> 1.4"
|
||||||
end
|
end
|
||||||
|
|
31
Gemfile.lock
31
Gemfile.lock
|
@ -73,8 +73,8 @@ GEM
|
||||||
nokogiri (1.10.9)
|
nokogiri (1.10.9)
|
||||||
mini_portile2 (~> 2.4.0)
|
mini_portile2 (~> 2.4.0)
|
||||||
nokogiri (1.10.9-java)
|
nokogiri (1.10.9-java)
|
||||||
parallel (1.19.2)
|
parallel (1.20.1)
|
||||||
parser (2.7.1.4)
|
parser (3.0.0.0)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
rack (2.2.3)
|
rack (2.2.3)
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
|
@ -92,7 +92,7 @@ GEM
|
||||||
thor (>= 0.20.3, < 2.0)
|
thor (>= 0.20.3, < 2.0)
|
||||||
rainbow (3.0.0)
|
rainbow (3.0.0)
|
||||||
rake (13.0.1)
|
rake (13.0.1)
|
||||||
regexp_parser (1.7.1)
|
regexp_parser (2.0.3)
|
||||||
rexml (3.2.4)
|
rexml (3.2.4)
|
||||||
rspec-core (3.9.2)
|
rspec-core (3.9.2)
|
||||||
rspec-support (~> 3.9.3)
|
rspec-support (~> 3.9.3)
|
||||||
|
@ -111,23 +111,24 @@ GEM
|
||||||
rspec-mocks (~> 3.9)
|
rspec-mocks (~> 3.9)
|
||||||
rspec-support (~> 3.9)
|
rspec-support (~> 3.9)
|
||||||
rspec-support (3.9.3)
|
rspec-support (3.9.3)
|
||||||
rubocop (0.85.1)
|
rubocop (1.7.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 2.7.0.1)
|
parser (>= 2.7.1.5)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.7)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml
|
rexml
|
||||||
rubocop-ast (>= 0.0.3)
|
rubocop-ast (>= 1.2.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 2.0)
|
unicode-display_width (>= 1.4.0, < 2.0)
|
||||||
rubocop-ast (0.1.0)
|
rubocop-ast (1.4.0)
|
||||||
parser (>= 2.7.0.1)
|
parser (>= 2.7.1.5)
|
||||||
rubocop-performance (1.6.1)
|
rubocop-performance (1.9.2)
|
||||||
rubocop (>= 0.71.0)
|
rubocop (>= 0.90.0, < 2.0)
|
||||||
ruby-progressbar (1.10.1)
|
rubocop-ast (>= 0.4.0)
|
||||||
standard (0.4.7)
|
ruby-progressbar (1.11.0)
|
||||||
rubocop (~> 0.85.0)
|
standard (0.11.0)
|
||||||
rubocop-performance (~> 1.6.0)
|
rubocop (= 1.7.0)
|
||||||
|
rubocop-performance (= 1.9.2)
|
||||||
thor (1.0.1)
|
thor (1.0.1)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
thread_safe (0.3.6-java)
|
thread_safe (0.3.6-java)
|
||||||
|
|
|
@ -13,7 +13,7 @@ Feature: automatically reloading factory_bot definitions
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
"""
|
"""
|
||||||
And I run `bundle exec rake db:migrate` with a clean environment
|
And I run `bin/rails db:migrate` with a clean environment
|
||||||
|
|
||||||
Scenario: When using factory_bot_rails together with Spring
|
Scenario: When using factory_bot_rails together with Spring
|
||||||
I want changes to my application to trigger the factory_bot_rails reloader
|
I want changes to my application to trigger the factory_bot_rails reloader
|
||||||
|
@ -44,14 +44,14 @@ Feature: automatically reloading factory_bot definitions
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
"""
|
"""
|
||||||
And I run `bundle binstubs bundler rake spring --force` with a clean environment
|
And I run `bundle binstubs bundler spring --force` with a clean environment
|
||||||
And I run `bin/spring binstub --all` with a clean environment
|
And I run `bin/spring binstub --all` with a clean environment
|
||||||
And I run `bin/rake test` with Spring enabled
|
And I run `bin/rails test` with Spring enabled
|
||||||
And I append to "app/models/user.rb" with:
|
And I append to "app/models/user.rb" with:
|
||||||
"""
|
"""
|
||||||
# User model edited
|
# User model edited
|
||||||
"""
|
"""
|
||||||
And I run `bin/rake test` with Spring enabled
|
And I run `bin/rails test` with Spring enabled
|
||||||
And I run `spring stop` with a clean environment
|
And I run `spring stop` with a clean environment
|
||||||
Then the output should contain "1 runs, 1 assertions"
|
Then the output should contain "1 runs, 1 assertions"
|
||||||
And the output should not contain "Failure:"
|
And the output should not contain "Failure:"
|
||||||
|
@ -70,9 +70,9 @@ Feature: automatically reloading factory_bot definitions
|
||||||
# Empty definition file to be picked up by the file watcher
|
# Empty definition file to be picked up by the file watcher
|
||||||
|
|
||||||
"""
|
"""
|
||||||
And I run `bundle binstubs bundler rake spring --force` with a clean environment
|
And I run `bundle binstubs bundler spring --force` with a clean environment
|
||||||
And I run `bin/spring binstub --all` with a clean environment
|
And I run `bin/spring binstub --all` with a clean environment
|
||||||
And I run `bin/rake test` with Spring enabled
|
And I run `bin/rails test` with Spring enabled
|
||||||
And I append to "test/factories.rb" with:
|
And I append to "test/factories.rb" with:
|
||||||
"""
|
"""
|
||||||
FactoryBot.define do
|
FactoryBot.define do
|
||||||
|
@ -93,7 +93,7 @@ Feature: automatically reloading factory_bot definitions
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
"""
|
"""
|
||||||
And I run `bin/rake test` with Spring enabled
|
And I run `bin/rails test` with Spring enabled
|
||||||
And I run `spring stop` with a clean environment
|
And I run `spring stop` with a clean environment
|
||||||
Then the output should contain "1 runs, 1 assertions"
|
Then the output should contain "1 runs, 1 assertions"
|
||||||
And the output should not contain "Failure:"
|
And the output should not contain "Failure:"
|
||||||
|
@ -130,6 +130,6 @@ Feature: automatically reloading factory_bot definitions
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
"""
|
"""
|
||||||
And I run `bundle exec rake test` with a clean environment
|
And I run `bin/rails test` with a clean environment
|
||||||
Then the output should contain "1 runs, 1 assertions"
|
Then the output should contain "1 runs, 1 assertions"
|
||||||
And the output should not contain "Failure:"
|
And the output should not contain "Failure:"
|
||||||
|
|
|
@ -4,7 +4,7 @@ PROJECT_ROOT =
|
||||||
File.expand_path(File.join(File.dirname(__FILE__), "..", "..")).freeze
|
File.expand_path(File.join(File.dirname(__FILE__), "..", "..")).freeze
|
||||||
|
|
||||||
Aruba.configure do |config|
|
Aruba.configure do |config|
|
||||||
config.exit_timeout = Integer ENV.fetch("ARUBA_TIMEOUT") { 120 }
|
config.exit_timeout = Integer ENV.fetch("ARUBA_TIMEOUT", 120)
|
||||||
end
|
end
|
||||||
|
|
||||||
if RUBY_PLATFORM == "java"
|
if RUBY_PLATFORM == "java"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
if Rails.gem_version < Gem::Version.new('6')
|
if Rails.gem_version < Gem::Version.new('6')
|
||||||
gsub_file "Gemfile", /^gem 'sqlite3'$/, 'gem "sqlite3", "~> 1.3.6"'
|
gsub_file "Gemfile", /^gem 'sqlite3'$/, 'gem "sqlite3", "~> 1.3.6"'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
gsub_file "Gemfile", /^ gem 'spring'$/, ' gem "spring", "!= 2.1.1"'
|
||||||
|
|
|
@ -12,7 +12,7 @@ gem "byebug"
|
||||||
gem "listen", "~> 3.0.5"
|
gem "listen", "~> 3.0.5"
|
||||||
gem "puma", "~> 3.0"
|
gem "puma", "~> 3.0"
|
||||||
gem "rails", "~> 5.0.7", ">= 5.0.7.2"
|
gem "rails", "~> 5.0.7", ">= 5.0.7.2"
|
||||||
gem "spring"
|
gem "spring", "!= 2.1.1"
|
||||||
gem "spring-watcher-listen", "~> 2.0.0"
|
gem "spring-watcher-listen", "~> 2.0.0"
|
||||||
gem "sqlite3", "~> 1.3.6"
|
gem "sqlite3", "~> 1.3.6"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ gem "byebug"
|
||||||
gem "listen", ">= 3.0.5", "< 3.2"
|
gem "listen", ">= 3.0.5", "< 3.2"
|
||||||
gem "puma", "~> 3.7"
|
gem "puma", "~> 3.7"
|
||||||
gem "rails", "~> 5.1.7"
|
gem "rails", "~> 5.1.7"
|
||||||
gem "spring"
|
gem "spring", "!= 2.1.1"
|
||||||
gem "spring-watcher-listen", "~> 2.0.0"
|
gem "spring-watcher-listen", "~> 2.0.0"
|
||||||
gem "sqlite3", "~> 1.3.6"
|
gem "sqlite3", "~> 1.3.6"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ gem "byebug"
|
||||||
gem "listen", ">= 3.0.5", "< 3.2"
|
gem "listen", ">= 3.0.5", "< 3.2"
|
||||||
gem "puma", "~> 3.11"
|
gem "puma", "~> 3.11"
|
||||||
gem "rails", "~> 5.2.4", ">= 5.2.4.2"
|
gem "rails", "~> 5.2.4", ">= 5.2.4.2"
|
||||||
gem "spring"
|
gem "spring", "!= 2.1.1"
|
||||||
gem "spring-watcher-listen", "~> 2.0.0"
|
gem "spring-watcher-listen", "~> 2.0.0"
|
||||||
gem "sqlite3", "~> 1.3.6"
|
gem "sqlite3", "~> 1.3.6"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ gem "byebug"
|
||||||
gem "listen", "~> 3.2"
|
gem "listen", "~> 3.2"
|
||||||
gem "puma", "~> 4.1"
|
gem "puma", "~> 4.1"
|
||||||
gem "rails", "~> 6.0.2", ">= 6.0.2.2"
|
gem "rails", "~> 6.0.2", ">= 6.0.2.2"
|
||||||
gem "spring"
|
gem "spring", "!= 2.1.1"
|
||||||
gem "spring-watcher-listen", "~> 2.0.0"
|
gem "spring-watcher-listen", "~> 2.0.0"
|
||||||
gem "sqlite3", "~> 1.4"
|
gem "sqlite3", "~> 1.4"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue