Skip to content

Add identifier option to #render_template#71

Open
r7kamura wants to merge 1 commit intorails:masterfrom
r7kamura:feature/identifier
Open

Add identifier option to #render_template#71
r7kamura wants to merge 1 commit intorails:masterfrom
r7kamura:feature/identifier

Conversation

@r7kamura
Copy link
Contributor

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.

@r7kamura
Copy link
Contributor Author

I added another pull request to fix CI failures, though the failures have nothing to do with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant