I was wondering if we have something like assert_no_template as the opposite of assert_template .
assert_no_template
assert_template
What I'm trying to check is that a particular template is not used in the actual render.
I put this in my test_helper.rb :
test_helper.rb
def assert_template_not_used(template, msg = nil) assert !@templates.any ? {|t, num| t.match(template)}, msg end
It is best to use the argument count: assert_template:
assert_template :partial => 'YOUR_PARTIAL', :count => 0
Not that I knew. What needs to be done instead? You could potentially claim this content.
Source: https://habr.com/ru/post/1339376/More articles:Add calendar event in android app - androidCombine multiple room availability requests into one - mysqlChecksum in UDP Datagram Socket + java - javaCropping an image using imagecopyresampled ()? - phpimage processing using a CUDA, python (pycuda) or C ++ implementation? - c ++jQuery to bind input value to span or div? - jqueryMultiple C # Regex Group Records - c #Should a model or ViewModel handle lazy loading of model properties? - c #How can I use decltype to get a link type? - c ++Xcode Lua. Lua file in the wrong place - scriptingAll Articles