Method: Whitestone.inside_custom_assertion
- Defined in:
- lib/whitestone.rb
.inside_custom_assertion ⇒ Object
inside_custom_assertion allows us (via yield) to run a custom assertion without racking up the assertion count for each of the assertions therein. Todo: consider making it a stack so that custom assertions can be nested.
379 380 381 382 383 384 385 |
# File 'lib/whitestone.rb', line 379 def inside_custom_assertion @inside_custom_assertion = true stats[:assertions] += 1 yield ensure @inside_custom_assertion = false end |