Sha256: 2e980e1f4505d7972d834556551f51840229926566721da143b0c2f321a849de

Contents?: true

Size: 940 Bytes

Versions: 1

Compression:

Stored size: 940 Bytes

Contents

require 'spec_helper'

describe ArchiveMenuRenderer do
  context 'excluding classes from child list' do
    it 'should be retrievable by the extended object' do
      ArchiveMenuRenderer.instance_variable_set(:@excluded_class_names, ['SkippedPage'])
      page = Object.new
      page.extend ArchiveMenuRenderer
      page.excluded_class_names.should include('SkippedPage')
    end
  end
end

describe ArchiveDayIndexMenuRenderer do
  subject{
    page = Object.new
    page.extend ArchiveDayIndexMenuRenderer
    page
  }
  its(:add_child_disabled?){ should be_true }
end

describe ArchiveMonthIndexMenuRenderer do
  subject{
    page = Object.new
    page.extend ArchiveMonthIndexMenuRenderer
    page
  }
  its(:add_child_disabled?){ should be_true }
end

describe ArchiveYearIndexMenuRenderer do
  subject{
    page = Object.new
    page.extend ArchiveYearIndexMenuRenderer
    page
  }
  its(:add_child_disabled?){ should be_true }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
radiant-archive-extension-1.0.4 spec/models/archive_menu_renderer_spec.rb