I was wondering if do we have something like assert_no_template
as the opposite of the assert_template
.
What I'm trying to test is that a concrete template is not used in the actual render.
A better way would be to use the :count argument to assert_template:
assert_template :partial => 'YOUR_PARTIAL', :count => 0
I put this in my test_helper.rb
:
def assert_template_not_used(template, msg = nil)
assert [email protected]? {|t, num| t.match(template)}, msg
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With