rails-controller-testing
rails-controller-testing copied to clipboard
Add identifier option to #render_template
In my Rails app, I needed to write a test that distinguishes whether a template for smartphone (e.g. app/views/articles/index.html+smartphone.erb) or one for PC (e.g. app/views/articles/index.html.erb) was rendered, but I couldn't write such test with the current rails-controller-testing implementation. This is because it only provides virtual_path (e.g. articles/index), which doesn't contain the variants information.
I'd like to add a new option identifier to be able to write these kinds of tests.
I added another pull request to fix CI failures, though the failures have nothing to do with this change.