Sha256: 826df91f7b125fb976fde8e7e44b0a1d65cd3110f69629fd6af21c6abb717d03

Contents?: true

Size: 760 Bytes

Versions: 9

Compression:

Stored size: 760 Bytes

Contents

require 'spec_helper'
require 'bh/helpers/glyphicon_helper'
include Bh::GlyphiconHelper

describe 'glyphicon' do
  specify 'given an icon name with underscores, returns the icon' do
    expect(glyphicon :zoom_in).to eq '<span class="glyphicon glyphicon-zoom-in"></span>'
  end

  specify 'given an icon name with dashes, returns the icon' do
    expect(glyphicon 'zoom-out').to eq '<span class="glyphicon glyphicon-zoom-out"></span>'
  end

  specify 'given no icon name, returns an empty icon' do
    expect(glyphicon).to eq '<span class="glyphicon"></span>'
  end

  specify 'given extra options, passes the options to the <span>' do
    expect(glyphicon :ok, title: 'Approved').to eq '<span class="glyphicon glyphicon-ok" title="Approved"></span>'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bh-1.1.1 spec/helpers/glyphicon_helper_spec.rb
bh-1.1.0 spec/helpers/glyphicon_helper_spec.rb
bh-1.0.1 spec/helpers/glyphicon_helper_spec.rb
bh-1.0.0 spec/helpers/glyphicon_helper_spec.rb
bh-0.0.8 spec/helpers/glyphicon_helper_spec.rb
bh-0.0.7 spec/helpers/glyphicon_helper_spec.rb
bh-0.0.6 spec/helpers/glyphicon_helper_spec.rb
bh-0.0.5 spec/helpers/glyphicon_helper_spec.rb
bh-0.0.4 spec/helpers/glyphicon_helper_spec.rb