Sha256: 96f843b4a54ac87d53b2e4c41cd8bf6983c33a30c15f752a74fb8354644233a2

Contents?: true

Size: 1010 Bytes

Versions: 59

Compression:

Stored size: 1010 Bytes

Contents

require File.dirname(__FILE__) + "/../spec_helper"

describe "AdminUI extensions for readers" do
  before :each do
    @admin = Radiant::AdminUI.new
    @admin.reader = Radiant::AdminUI.load_default_reader_regions
  end

  it "should be included into Radiant::AdminUI" do
    Radiant::AdminUI.included_modules.should include(ReaderAdminUI)
  end

  it "should define a collection of Region Sets for readers" do
    @admin.should respond_to('reader')
    @admin.should respond_to('readers')
    @admin.send('reader').should_not be_nil
    @admin.send('reader').should be_kind_of(OpenStruct)
  end

  describe "should define default regions" do
    %w{new edit remove index}.each do |action|
      
      describe "for '#{action}'" do
        before do
          @reader = @admin.reader
          @reader.send(action).should_not be_nil
        end
              
        it "as a RegionSet" do
          @reader.send(action).should be_kind_of(Radiant::AdminUI::RegionSet)
        end
      end
    end
  end
end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
radiant-reader-extension-3.0.38 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.37 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.36 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.35 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.33 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.32 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.31 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.30 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.29 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.28 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.27 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.26 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.25 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.24 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.23 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.20 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.19 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.18 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.17 spec/lib/reader_admin_ui_spec.rb
radiant-reader-extension-3.0.16 spec/lib/reader_admin_ui_spec.rb