Sha256: 387b8399b3d3dd21982f6bcc9f9a759d75a29a4c9e1dc372352a843d18f1c474

Contents?: true

Size: 1.18 KB

Versions: 10

Compression:

Stored size: 1.18 KB

Contents

require 'rails_helper'

module BootstrapLeather
  RSpec.describe IconsHelper, folder: :helpers do
    describe '#icon' do
      subject { helper.icon 'check' }
      it { should have_tag 'span', with: { class: 'glyphicon-check' } }
    end

    describe '#icon_button_to' do
      subject do
        helper.icon_button_to(
          'success',
          'check',
          'Link Text',
          'http://example.com',
          class: 'example'
        )
      end
      it do
        should have_tag(
                 :a,
                 class: 'example',
                 href: 'http://example.com',
                 text: /Link Text/
               )
      end
      it { should have_tag 'span', with: { class: 'glyphicon-check' } }
    end

    describe '#icon_link_to' do
      subject do
        helper.icon_link_to(
          'check', 'Link Text', 'http://example.com', class: 'example'
        )
      end
      it do
        should have_tag(
                 :a,
                 class: 'example',
                 href: 'http://example.com',
                 text: /Link Text/
               )
      end
      it { should have_tag 'span', with: { class: 'glyphicon-check' } }
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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