Sha256: ca0300b1418fff6b678228411273d1a502b5e3be8a5052a608fb394270ff00cb

Contents?: true

Size: 1.19 KB

Versions: 39

Compression:

Stored size: 1.19 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(render_breadcrumbs).to like_of %Q{
        <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(render_breadcrumbs).to like_of %Q{
        <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(render_breadcrumbs('>')).to like_of %Q{
        <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

39 entries across 39 versions & 1 rubygems

Version Path
semantic-ui-sass-2.1.3.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-2.0.7.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-2.0.4.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-1.12.3.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-1.11.5.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-1.11.4.1 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-1.11.4.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-1.8.1.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-1.8.0.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-1.7.3.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-1.7.0.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-0.19.3.1 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-0.19.3.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-0.16.1.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-0.15.5.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-0.15.4.2 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-0.15.4.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-0.15.2.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-0.15.1.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb
semantic-ui-sass-0.14.0.0 spec/helpers/semantic_breadcrumbs_helper_spec.rb