## test_helper.rb 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