Sha256: fbfd285bdee2f9345e9419866f2dcd21f6b0b26e59b69f0579b8aea173185c32
Contents?: true
Size: 978 Bytes
Versions: 1
Compression:
Stored size: 978 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require 'action_view' require 'active_support' require_relative '../../../app/helpers/railsstrap/badge_label_helper' include ActionView::Helpers include ActionView::Context include Railsstrap::BadgeLabelHelper describe Railsstrap::BadgeLabelHelper, :type => :helper do it 'should return a basic railsstrap badge' do expect(badge('New!').gsub(/\s/, '').downcase) .to eql(BASIC_BADGE.gsub(/\s/, '').downcase) end it 'should return a railsstrap badge with class' do expect(badge('2', :warning).gsub(/\s/, '').downcase) .to eql(BADGE_WITH_CLASS.gsub(/\s/, '').downcase) end it 'should take a Number as its first parameter' do expect(badge(12).gsub(/\s/, '').downcase).to eql(BADGE_WITH_NUMBER_PARAM.gsub(/\s/, '').downcase) end end BASIC_BADGE = '<span class="badge">New!</span>' BADGE_WITH_CLASS = '<span class="badge badge-warning">2</span>' BADGE_WITH_NUMBER_PARAM = '<span class="badge">12</span>'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
railsstrap-3.3.4 | spec/lib/railsstrap/badge_label_helper_spec.rb |