Sha256: 27996d098e845e4b0bdd213fa0b907a65aeb8b644206ebd3c6646841457fc90a

Contents?: true

Size: 585 Bytes

Versions: 16

Compression:

Stored size: 585 Bytes

Contents

require 'spec_helper'

describe ActiveAdmin::Views::Pages::Layout do

  describe "the page title" do

    it "should be the @page_title if assigned in the controller" do
      assigns = {:page_title => "My Page Title"}
      layout = ActiveAdmin::Views::Pages::Layout.new(assigns, nil)
      layout.title.should == "My Page Title"
    end

    it "should be the default translation" do
      assigns = {}
      helpers = mock(:params => {:action => 'edit'})
      layout = ActiveAdmin::Views::Pages::Layout.new(assigns, helpers)
      layout.title.should == "Edit"
    end

  end

end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
activeadmin-0.4.4 spec/unit/views/pages/layout_spec.rb
activeadmin-0.4.3 spec/unit/views/pages/layout_spec.rb
activeadmin-0.4.2 spec/unit/views/pages/layout_spec.rb
activeadmin-0.4.1 spec/unit/views/pages/layout_spec.rb
activeadmin-0.4.0 spec/unit/views/pages/layout_spec.rb
andrewroth_activeadmin-0.3.4.4 spec/unit/views/pages/layout_spec.rb
andrewroth_activeadmin-0.3.4.3 spec/unit/views/pages/layout_spec.rb
andrewroth_activeadmin-0.3.4.2 spec/unit/views/pages/layout_spec.rb
andrewroth_activeadmin-0.3.4.1 spec/unit/views/pages/layout_spec.rb
andrewroth_activeadmin-0.3.4 spec/unit/views/pages/layout_spec.rb
activeadmin-0.3.4 spec/unit/views/pages/layout_spec.rb
activeadmin-0.3.3 spec/unit/views/pages/layout_spec.rb
activeadmin-0.3.2 spec/unit/views/pages/layout_spec.rb
activeadmin-0.3.1 spec/unit/views/pages/layout_spec.rb
activeadmin-0.3.0 spec/unit/views/pages/layout_spec.rb
nsm-activeadmin-0.2.2 spec/unit/views/pages/layout_spec.rb