Sha256: 80a3ebd340b2ae7e37728778bcfdc2f58e4d61d08e68c96d0ee641122310926c
Contents?: true
Size: 1.21 KB
Versions: 2
Compression:
Stored size: 1.21 KB
Contents
# frozen_string_literal: true 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">></div> <div class="active section">Posts</div> </div> ) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fomantic-ui-sass-2.9.3.2 | spec/helpers/semantic_breadcrumbs_helper_spec.rb |
fomantic-ui-sass-2.9.3.1 | spec/helpers/semantic_breadcrumbs_helper_spec.rb |