require 'test_helper' require 'iconoclast' class IconHelperTest < ActionView::TestCase context "The iconoclast view helper" do tests Iconoclast::IconHelper setup do IconTag = { %(icon('zoom')) => %(Zoom), %(icon('zoom', 'alttext')) => %(alttext), %(icon('zoom', 'alttext', { :border => 1 })) => %(alttext), } end should "return the proper HTML" do IconTag.each do |method, tag| assert_dom_equal(tag, eval(method)) end end end end