Skip to content

Commit fe56bf8

Browse files
authored
Install spec/fixtures/**/Gemfile in frozen mode (grosser#863)
Through the use of `bundle install` these files change on a test run if the parallel_tests version changes. For example, right now parallel_tests is version 3.8.1 but is specified as 3.8.0 in spec/fixtures/rails70/Gemfile.lock. Running rspec results in a undesired change to this file. When submitting pull requests, it is best practice to avoid unrelated changes, so this slightly slows down a contributor's workflow. Use the frozen configuration option to ensure that these files are always up to date. If they are not, CI will fail with a useful message. See https://bundler.io/man/bundle-config.1.html > frozen (BUNDLE_FROZEN): Disallow changes to the Gemfile. When the > Gemfile is changed and the lockfile has not been updated, running > Bundler commands will be blocked. Defaults to true when --deployment > is used.
1 parent c1b7643 commit fe56bf8

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

spec/fixtures/rails60/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ../../..
33
specs:
4-
parallel_tests (3.8.0)
4+
parallel_tests (3.9.0)
55
parallel
66

77
GEM

spec/fixtures/rails61/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ../../..
33
specs:
4-
parallel_tests (3.8.0)
4+
parallel_tests (3.9.0)
55
parallel
66

77
GEM

spec/rails_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def run(command, options = {})
2626
ENV.delete("RACK_ENV")
2727

2828
run ["bundle", "config", "--local", "path", "vendor/bundle"]
29+
run ["bundle", "config", "--local", "frozen", "true"]
2930
run ["bundle", "install"]
3031
FileUtils.rm_f(Dir['db/*.sqlite3'])
3132
run ["bundle", "exec", "rake", "db:setup", "parallel:create"]

0 commit comments

Comments
 (0)