require 'helper' class TestSemanticAttributesHelper < TestCase context "semantic_attributes_helper" do setup do setup_fixtures end should "generate output event when no block given" do expected = html <<-EOHTML
  1. Name IT Pro Blog
  2. Url http://www.it.pro.blog
  3. Author full name Doe, John
EOHTML actual = @template.semantic_attributes_for(@blog) assert_equal expected, actual end should "run block" do block_run = false @template.semantic_attributes_for(@user) do |attr| block_run = true end assert block_run end should "accept options" do expected = html <<-EOHTML
EOHTML actual = @template.semantic_attributes_for(@user, :html => {:class => 'simple show'}) do |attr| true end assert_equal expected, actual end end end