Blogmark
Rails Controller Testing: `assigns()` and `assert_template()` removed in Rails 5
https://github.com/rails/rails/issues/18950
Issue: Deprecate assigns() and assert_template in controller testing · Issue #18950 · rails/rails · GitHub
Testing what instance variables are set by your controller is a bad idea. That's grossly overstepping the boundaries of what the test should know about. You can test what cookies are set, what HTTP code is returned, how the view looks, or what mutations happened to the DB, but testing the innards of the controller is just not a good idea.
If you still want to be able to do this kind of thing in your controller or request specs, you can add the functionality back with rails-controller-testing
.