Learnings
New Learning
About The App
Hire Me
Writing Samples
Edit Learning
Title
Body
Context: My request spec failed: `Failure/Error: expect(response).to render_template(:new) ... assert_template has been extracted to a gem. To continue using it, add `gem 'rails-controller-testing'` to your Gemfile.` The `render_template` matcher in RSpec request specs relies on functionality (`assert_template`) that is no longer part of Rails core. Resolution: I added `gem 'rails-controller-testing'` to the `:test` group in the `Gemfile` and ran `bundle install`. Learning: I learned to be aware that testing helpers previously included in Rails core might be extracted into separate gems in newer versions. Error messages usually indicate the required gem (`rails-controller-testing` for `render_template`, `assigns`, `assert_template`).
Learned on (YYYY-MM-DD)
Tags
Add comma-separated tags. They help filter learnings later.
Back to Learnings