Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Template variants on 4.0.0.beta2 with Rails 6.0.0.rc1 #2114
The following spec passes on rspec-rails 3.8.2, rails 5.2.3, but errors on rspec-rails 4.0.0.beta2, rails 6.0.0.rc1:
# spec/views/layouts/sidebars/_main.html+app.haml_spec.rb require 'rails_helper' RSpec.describe 'layouts/sidebars/_main.html+app.haml', type: :view do it 'renders' do render end end
I was also able to duplicate this with an
Yes, I will add code there to reproduce.
I think you have wrong gem versions here? Do you mean Rails 6.0.0.rc1 and some different version of rspec-rails?
This is due to a change in Rails, specifically rails/rails#35661, but IMO the new behaviour is good. The issue is this filename parsing in rspec-rails doesn't actually support variants (and so it passes a format like
I'm hoping to break this even more in future versions of Rails so I'm glad we're catching it now