Sha256: 99c9299022e87e9dc88f84048619e5645c978cfd1477eb05ab4474b9f76b21f6

Contents?: true

Size: 1.18 KB

Versions: 24

Compression:

Stored size: 1.18 KB

Contents

require 'spec_helper'

describe SemanticBreadcrumbsHelper do
  describe 'semantic_breadcrumbs' do
    it 'should return breadcrumbs' do
      controller.instance_variable_set('@breadcrumbs', [{ name: 'Home', url: '/' }])
      expect(semantic_breadcrumbs).to like_of %(
       <div class="ui breadcrumb">
        <div class="active section">Home</div>
       </div>
      )
    end

    it 'should return breadcrumbs with multi params' do
      controller.instance_variable_set('@breadcrumbs', [{ name: 'Home', url: '/' }, { name: 'Posts', url: '/posts' }])
      expect(semantic_breadcrumbs).to like_of %(
       <div class="ui breadcrumb">
         <a href="/">Home</a>
         <div class="divider">/</div>
         <div class="active section">Posts</div>
       </div>
     )
    end

    it 'should return breadcrumbs with divider' do
      controller.instance_variable_set('@breadcrumbs', [{ name: 'Home', url: '/' }, { name: 'Posts', url: '/posts' }])
      expect(semantic_breadcrumbs('>')).to like_of %(
       <div class="ui breadcrumb">
         <a href="/">Home</a>
         <div class="divider">&gt;</div>
         <div class="active section">Posts</div>
       </div>
     )
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
fomantic-ui-sass-2.9.3 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.9.2 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.9.1 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.9.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.8.1 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.8 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.7.1 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.7 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.6 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.5 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.4 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.3 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.2 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.1.1 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.8.1 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.7.8 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.7.7 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.7.6 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.7.5 spec/helpers/semantic_breadcrumbs_helper_spec.rb
fomantic-ui-sass-2.7.4 spec/helpers/semantic_breadcrumbs_helper_spec.rb