Sha256: 0205e2584adb7d64a705ccc8f3f1c1253ebad37b9bfee5ee57b21971473f034a

Contents?: true

Size: 712 Bytes

Versions: 5

Compression:

Stored size: 712 Bytes

Contents

require "spec_helper"
include Nanoc::Toolbox::Helpers::HtmlTag

describe Nanoc::Toolbox::Helpers::HtmlTag do
  describe "#tag" do
    it "returns an simple self-closing tag by default" do
      tag("br").should == "<br />"
    end
    
    it "returns an simple self-closing tag with option" do
      tag("hr", :class => "thin").should == %[<hr class="thin" />]
    end
  end
  
  describe "#content_tag" do
    it "returns an simple with content tag by default" do
      content_tag("b", "Hello").should == "<b>Hello</b>"
    end
    
    it "returns an simple with content tag with options" do
      content_tag("b", "Hello", :class => "highlight").should == %[<b class="highlight">Hello</b>]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nanoc-toolbox-0.0.7 spec/helpers/html_tag_spec.rb
nanoc-toolbox-0.0.6 spec/helpers/html_tag_spec.rb
nanoc-toolbox-0.0.5 spec/helpers/html_tag_spec.rb
nanoc-toolbox-0.0.4 spec/helpers/html_tag_spec.rb
nanoc-toolbox-0.0.3 spec/helpers/html_tag_spec.rb