Sha256: da5c4245449177415916c07ae6d621d6b87eb9cb1e3f477fe0f1d89ca733ac5e
Contents?: true
Size: 641 Bytes
Versions: 83
Compression:
Stored size: 641 Bytes
Contents
require 'spec_helper' describe Tenon::PageDecorator do let(:pd) { Tenon::PageDecorator.new(page) } describe '#option_title' do context 'when a page has a depth of 0' do let(:page) { double(depth: 0, title: 'title') } it "should return the page's title" do expect(pd.option_title).to eq(page.title) end end context 'when a page has a depth of 1' do let(:page) { double(depth: 1, title: 'title') } it "should return some nesting and the page's title" do expected = " - #{page.title}" expect(pd.option_title).to eq(expected) end end end end
Version data entries
83 entries across 83 versions & 1 rubygems