Sha256: 60a12ef4ba418abca7e801e69933fe3af3aa6b3335f642681193ffd0f34a0d18

Contents?: true

Size: 991 Bytes

Versions: 2

Compression:

Stored size: 991 Bytes

Contents

require 'spec_helper'

describe PageTitleHelper do
  describe "#page_title with no options" do
    subject { helper.page_title }
    it { should == "Dummy" }
  end
  describe "#page_title with site name" do
    subject { helper.page_title(:app_name => 'Test') }
    it { should == "Test" }
  end
  describe "#page_title with content for page title" do
    before { helper.content_for(:page_title, 'page title') }
    subject { helper.page_title }
    it { should == "Dummy : page title" }
  end
  describe "#page_title with content for page title and alternate separator" do
    before { helper.content_for(:page_title, 'page title') }
    subject { helper.page_title(:separator => ' | ') }
    it { should == "Dummy | page title" }
  end
  describe "#page_title with content for alternate symbol" do
    before { helper.content_for(:alt_page_title, 'page title') }
    subject { helper.page_title(:page_title_symbol => :alt_page_title) }
    it { should == "Dummy : page title" }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flutie-2.0.0 spec/helpers/page_title_helper_spec.rb
flutie-1.3.4 spec/helpers/page_title_helper_spec.rb