Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
## test_helper.rb

ENV["RAILS_ENV"] = "test"
PLUGIN_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))

require 'test/unit'
require 'rubygems'
require 'hpricot'
require 'active_support'
require 'action_view'
require 'active_support/test_case'

class ActiveSupport::TestCase
  
  def assert_tag_in(target, match)
    target = Hpricot(target)
    assert !target.search(match).empty?, 
      "expected tag, but no tag found matching #{match.inspect} in:\n#{target.inspect}"
  end
  
end