Sha256: 20274ca3ca34ddb57958701875bbd9058125e5b08c8f4093dba291b3b6428184

Contents?: true

Size: 733 Bytes

Versions: 2

Compression:

Stored size: 733 Bytes

Contents

# encoding: utf-8
require 'spec_helper'
require 'action_view'
require 'active_support'
require_relative '../../../app/helpers/railsstrap/icon_helper'

include ActionView::Helpers
include ActionView::Context
include Railsstrap::IconHelper

describe Railsstrap::IconHelper, :type => :helper do
  it "should return a basic fontawesome icon" do
    expect(icon(:refresh).gsub(/\s/, '').downcase)
    .to eql(BASIC_ICON.gsub(/\s/, '').downcase)
  end

  it "should return a fontawesome icon with span" do
    expect(icon(:refresh, {:tag => :span}).gsub(/\s/, '').downcase)
    .to eql(ICON_WITH_SPAN.gsub(/\s/, '').downcase)
  end
end

BASIC_ICON = %{<iclass=\"fafa-refresh\"></i>}
ICON_WITH_SPAN = %{<spanclass=\"fafa-refresh\"></span>}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
railsstrap-3.3.4 spec/lib/railsstrap/icon_helper_spec.rb
railsstrap-3.3.2 spec/lib/railsstrap/icon_helper_spec.rb