Skip to content

Commit efb680e

Browse files
committed
fixup! Revert the removal of condition
Having no condition makes it complicated to locally test against Rails 4.2
1 parent ffe3717 commit efb680e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

example_app_generator/generate_app.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@
3333
gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.3.6'"
3434
end
3535

36-
append_to_file 'Gemfile', "gem 'rails-controller-testing'\n"
36+
# We soft-support Rails 4.2. `rails-controller-testing` only supports Rails 5+.
37+
# This conditional is to facilitate local testing against Rails 4.2.
38+
if Rails::VERSION::STRING >= '5'
39+
append_to_file 'Gemfile', "gem 'rails-controller-testing'\n"
40+
end
3741

3842
if Rails::VERSION::STRING >= '6'
3943
gsub_file "Gemfile", /.*rails-controller-testing.*/, "gem 'rails-controller-testing', git: 'https://github.com/rails/rails-controller-testing'"

0 commit comments

Comments
 (0)