diff options
Diffstat (limited to 'actionpack/lib/action_controller/testing/assertions/tag.rb')
-rw-r--r-- | actionpack/lib/action_controller/testing/assertions/tag.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/actionpack/lib/action_controller/testing/assertions/tag.rb b/actionpack/lib/action_controller/testing/assertions/tag.rb index 80249e0e83..d9197b7855 100644 --- a/actionpack/lib/action_controller/testing/assertions/tag.rb +++ b/actionpack/lib/action_controller/testing/assertions/tag.rb @@ -94,11 +94,9 @@ module ActionController # that allow optional closing tags (p, li, td). <em>You must explicitly # close all of your tags to use these assertions.</em> def assert_tag(*opts) - clean_backtrace do - opts = opts.size > 1 ? opts.last.merge({ :tag => opts.first.to_s }) : opts.first - tag = find_tag(opts) - assert tag, "expected tag, but no tag found matching #{opts.inspect} in:\n#{@response.body.inspect}" - end + opts = opts.size > 1 ? opts.last.merge({ :tag => opts.first.to_s }) : opts.first + tag = find_tag(opts) + assert tag, "expected tag, but no tag found matching #{opts.inspect} in:\n#{@response.body.inspect}" end # Identical to +assert_tag+, but asserts that a matching tag does _not_ @@ -116,11 +114,9 @@ module ActionController # assert_no_tag :tag => "p", # :children => { :count => 1..3, :only => { :tag => "img" } } def assert_no_tag(*opts) - clean_backtrace do - opts = opts.size > 1 ? opts.last.merge({ :tag => opts.first.to_s }) : opts.first - tag = find_tag(opts) - assert !tag, "expected no tag, but found tag matching #{opts.inspect} in:\n#{@response.body.inspect}" - end + opts = opts.size > 1 ? opts.last.merge({ :tag => opts.first.to_s }) : opts.first + tag = find_tag(opts) + assert !tag, "expected no tag, but found tag matching #{opts.inspect} in:\n#{@response.body.inspect}" end end end |