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

Version Path
rad_core-0.2.6 spec/html/basic_html_helper_spec.rb
rad_core-0.2.5 spec/html/basic_html_helper_spec.rb
rad_core-0.2.4 spec/html/basic_html_helper_spec.rb
rad_core-0.2.3 spec/html/basic_html_helper_spec.rb
rad_core-0.2.2 spec/html/basic_html_helper_spec.rb
rad_core-0.2.1 spec/html/basic_html_helper_spec.rb
rad_core-0.2.0 spec/html/basic_html_helper_spec.rb
rad_core-0.0.30 spec/html/basic_html_helper_spec.rb
rad_core-0.0.29 spec/html/basic_html_helper_spec.rb
rad_core-0.0.28 spec/html/basic_html_helper_spec.rb
rad_core-0.0.27 spec/html/basic_html_helper_spec.rb
rad_core-0.0.26 spec/html/basic_html_helper_spec.rb
rad_core-0.0.25 spec/html/basic_html_helper_spec.rb
rad_core-0.0.24 spec/html/basic_html_helper_spec.rb
rad_core-0.0.23 spec/html/basic_html_helper_spec.rb
rad_core-0.0.22 spec/html/basic_html_helper_spec.rb
rad_core-0.0.21 spec/html/basic_html_helper_spec.rb
rad_core-0.0.20 spec/html/basic_html_helper_spec.rb
rad_core-0.0.19 spec/html/basic_html_helper_spec.rb
rad_core-0.0.18 spec/html/basic_html_helper_spec.rb