Re:TTNT: Test This, Not That
by ahuth on Friday October 02, 2015 @11:07AM
(#10319002)
Regarding the testing of views:
If using RSpec, there are "view" tests that test rendering the html in isolation. You specify the instance variables (AKA input) that the template is expecting, and you test the output. No server request/response is involved.
If using RSpec, there are "view" tests that test rendering the html in isolation. You specify the instance variables (AKA input) that the template is expecting, and you test the output. No server request/response is involved.
See https://www.relishapp.com/rspec/rspec-rails/v/2-0/docs/view-...