Sha256: 29412832224db9d8cf303048c4266dbf91f9cc30e350140fec4dae24af919782
Contents?: true
Size: 855 Bytes
Versions: 17
Compression:
Stored size: 855 Bytes
Contents
require 'spec/spec_helper' describe HamlLayouts::Models::Layout do dataset :layouts_layouts, :layouts_pages describe 'content' do context 'a haml layout' do it 'should return html rendered' do expected = <<-CONTENT <r:inside_layout name='parent'> <h1 data-layout="<r:find url='find'><r:layout/></r:find>" id='<r:layout/>'> <r:layout></r:layout> </h1> </r:inside_layout> CONTENT layouts(:haml).rendered_content.should === expected end end end describe 'is_haml?' do context 'layout has a content type of haml' do it 'should return true' do layouts(:haml).is_haml?.should be_true end end context 'layout does not have a content type of haml' do it 'should return false' do layouts(:child).is_haml?.should be_false end end end end
Version data entries
17 entries across 17 versions & 2 rubygems