Report abuse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
ENV["RAILS_ENV"] = "test"
PLUGIN_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
require 'test/unit'
require 'rubygems'
require 'active_support'
require 'action_controller'
require 'action_view'
require 'rexml/document'
require 'html/document'
require 'active_support/test_case'
class ActiveSupport::TestCase
def assert_tag_in(*opts)
target = HTML::Document.new(opts.shift, false, false)
opts = opts.size > 1 ? opts.last.merge({ :tag => opts.first.to_s }) : opts.first
assert !target.find(opts).nil?, "expected tag, but no tag found matching #{opts.inspect} in:\n#{target.inspect}"
end
end
|