Sha256: 6095f796a05b487d9fcab1692480efb4a9f898d3b9b690a888027f7355b71f90
Contents?: true
Size: 1.25 KB
Versions: 26
Compression:
Stored size: 1.25 KB
Contents
require File.dirname(__FILE__) + '/spec_helper' # Merb::Router.prepare do # default_routes # end describe Merb::Helpers::Tag do include Merb::Helpers::Tag describe "#tag" do it 'generates <div>content</div> from tag :div, "content"' do response = request "/tag_helper/tag_with_content" response.should have_selector("div") response.body.to_s.should include("Astral Projection ~ Dancing Galaxy") end it 'outputs content returned by the block when block is given' do response = request "/tag_helper/tag_with_content_in_the_block" response.should have_selector("div") response.body.should include("Astral Projection ~ Trust in Trance 1") end it 'generates tag attributes for all of keys of last Hash' do response = request "/tag_helper/tag_with_attributes" response.should have_selector("div.psy") response.should have_selector("div#bands") response.should have_selector("div[invalid_attr='at least in html']") end it 'handles nesting of tags/blocks' do response = request "/tag_helper/nested_tags" response.should have_selector("div.discography ul.albums li.first") response.should have_selector("#tit:contains('Trust in Trance 2')") end end end
Version data entries
26 entries across 26 versions & 2 rubygems