Upgrading to rspec-rails 5.1 fixed the issue. Thanks a lot! On Thursday, 26 May 2022 at 11:29:54 UTC+2 belgoros wrote:
> It seems like there was some discussions about the same issue: > - https://github.com/rails/rails-controller-testing/issues/73 > > and there is a PR waiting to be merged: > https://github.com/rails/rails-controller-testing/pull/76 > > On Thursday, 26 May 2022 at 11:19:30 UTC+2 [email protected] wrote: > >> Hi >> >> Have you tried upgrading rspec-rails to `5.1.2` thats where support for >> Rails 6.1 exists and there were some changes in this area. >> >> Cheers >> Jon >> >> On Tue, 24 May 2022, at 10:16 AM, belgoros wrote: >> >> The difference is also in the version of `rails-controller-testing >> <https://github.com/rails/rails-controller-testing>` gem: >> - 1.0.5 for Rails 6.1.5 >> - 1.0.4 for Rails 5.2.4 >> On Tuesday, 24 May 2022 at 11:01:13 UTC+2 belgoros wrote: >> >> When I check the status of the response, it is correct in both, Rails 5.2 >> and 6.1.5 version - 404. >> >> On Tuesday, 24 May 2022 at 09:56:13 UTC+2 belgoros wrote: >> >> I have a controller spec passing in Rails 5.2 but failing in Rails 6.1.5: >> >> ``` >> expect(response).to render_template(file: "#{Rails.root}/public/404.html") >> ``` >> What can be different between 2 Rails versions? >> >> The error I get: >> >> ``` >> >> Failure/Error: expect(response).to render_template(file: *"* >> #{Rails.root}/public/404.html*"*) >> >> Expected [] to include "/Users/XXX/my_rails_app/public/404.html". >> >> ``` >> >> Used spec-rails version: 4.0.2. >> >> Any ideas? >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "rspec" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rspec/03254267-848c-4a94-8c32-e4e1222fb29dn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/rspec/03254267-848c-4a94-8c32-e4e1222fb29dn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> >> -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/f91f5feb-4c73-4961-9ac7-caccd91baeffn%40googlegroups.com.
