Fix `ActionView::Template#formats` issue in Rails 6
Fix `ActionView::Template#formats` issue in Rails 6

In Rails 6 the `ActionView::Template#formats` method has been deprecated
[1] and replaced with `ActionView::Template#format` method.

I have attempted to retain support for Rails <= 5.2.

[1] https://www.github.com/rails/rails/commit/ca5e23ed4d8

rspec/rspec-rails,rspec/rspec-rails,rspec/rspec-rails