Sha256: 3c7bcc30a451187a9571385b6e57ded5d1ae133846694b5212b1f52a5e1b0a9e

Contents?: true

Size: 1.09 KB

Versions: 10

Compression:

Stored size: 1.09 KB

Contents

require 'rails_helper'

module BootstrapLeather
  RSpec.describe TypographyHelper, folder: :helpers do
    helper HeadHelper

    describe '#render_h1' do
      before do
        helper.add_title 'Title'
      end
      it 'shows the title' do
        expect(helper.render_h1).to(have_tag 'h1', text: /Title/)
      end
    end
    describe '#render_page_header' do
      before do
        helper.add_title 'Title'
        helper.add_subtitle 'Subtitle'
      end
      it 'shows the title and subtitle' do
        expect(helper.render_page_header).to(
          have_tag('div', with: { class: 'page-header' }) do
            with_tag 'h1', text: /Title/ do
              with_tag 'small', text: /Subtitle/
            end
          end
        )
      end
    end
    describe '#dl' do
      it 'shows a dl' do
        expect(helper.dl( { name: 'Name', body: 'Body' } )).to(
          have_tag('dl') do
            with_tag 'dt', text: /name/
            with_tag 'dd', text: /Name/
            with_tag 'dt', text: /body/
            with_tag 'dd', text: /Body/
          end
        )
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bootstrap_leather-0.10.14 spec/helpers/bootstrap_leather/typography_helper_spec.rb
bootstrap_leather-0.10.13 spec/helpers/bootstrap_leather/typography_helper_spec.rb
bootstrap_leather-0.10.11 spec/helpers/bootstrap_leather/typography_helper_spec.rb
bootstrap_leather-0.10.10 spec/helpers/bootstrap_leather/typography_helper_spec.rb
bootstrap_leather-0.10.9 spec/helpers/bootstrap_leather/typography_helper_spec.rb
bootstrap_leather-0.10.8 spec/helpers/bootstrap_leather/typography_helper_spec.rb
bootstrap_leather-0.10.7 spec/helpers/bootstrap_leather/typography_helper_spec.rb
bootstrap_leather-0.10.6 spec/helpers/bootstrap_leather/typography_helper_spec.rb
bootstrap_leather-0.10.5 spec/helpers/bootstrap_leather/typography_helper_spec.rb
bootstrap_leather-0.10.4 spec/helpers/bootstrap_leather/typography_helper_spec.rb