Skip to content

Commit

Permalink
Rails >= 7.1 doesn't render an HTML from redirect_to
Browse files Browse the repository at this point in the history
since https://github.com/rails/rails/c2e756a944fd3ca2efa58bd285c0e75e0b4794ab

Also, added some more HTMLs that are rendered on older Rails
  • Loading branch information
amatsuda committed Aug 2, 2024
1 parent 0d4feae commit b024483
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions spec/still_life_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,20 @@ def dump_dir(file)
system "RAILS_VERSION=#{ENV['RAILS_VERSION']} RAILS_ENV=test bundle e rails db:setup"
system "RAILS_VERSION=#{ENV['RAILS_VERSION']} STILL_LIFE=#{STILL_LIFE_ENV_VAR} bundle e rspec spec/controllers/ spec/requests/"

expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-106"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-113"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-131"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-137"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-80"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-85"))
if (ENV['RAILS_VERSION'].to_i < 7) || (ENV['RAILS_VERSION'] == '7.0')
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-106"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-113"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-131"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-137"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-80"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-85"))
end
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-121"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-48"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-56"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-63"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-71"))
expect(File).to exist(dump_dir("controllers/users_controller_spec.rb-92"))
expect(File).to exist(dump_dir("requests/users_spec.rb-6"))

system "RAILS_VERSION=#{ENV['RAILS_VERSION']} STILL_LIFE=#{STILL_LIFE_ENV_VAR} bundle e bin/rails spec:system"
Expand Down

0 comments on commit b024483

Please sign in to comment.