Sha256: 48e952ab2d240a841eda3f5363c61ad72b4a8d7899509dc0e12c918cf3e55f72
Contents?: true
Size: 901 Bytes
Versions: 24
Compression:
Stored size: 901 Bytes
Contents
require 'html/spec_helper' describe "BasicHtmlHelper" do before do @t = Rad::MockTemplateContext.new @t.class_eval do def url_for *args args.join(' ') end end end it "tag" do @t.tag(:div, 'content', class: 'hidden').should == %(<div class="hidden">content</div>) @t.tag(:div, class: 'hidden'){'content'} @t.buffer.should == %(<div class="hidden">content</div>) end it "stylesheet_link_tag" do @t.stylesheet_link_tag('/public/js/app.css').should == %(<link href="/public/js/app.css" media="screen" rel="stylesheet" type="text/css"></link>) end it "image_tag" do @t.image_tag('face.png', width: 100).should == %(<img src="face.png" width="100"></img>) end describe "basic html tags" do it "label" do @t.label_tag('book', 'Book').should == %(<label for="book">Book</label>) end end end
Version data entries
24 entries across 24 versions & 1 rubygems