Sha256: 71120c7b59dd46c452610f9fbf3fd22a78cb93c3a6179c8171d868dd3869d262

Contents?: true

Size: 728 Bytes

Versions: 8

Compression:

Stored size: 728 Bytes

Contents

require 'spec_helper'

describe Outpost::Controller do
  describe '::fields' do
    let(:controller) { Outpost::PeopleController.new }

    it 'sets default fields' do
      controller.fields.should include "name"
      controller.fields.should include "email"
      controller.fields.should_not include "id"
      controller.fields.should_not include "updated_at"
      controller.fields.should_not include "created_at"
    end
  end

  describe "::list" do
    let(:controller) { PidgeonsController.new }

    it "defines a list if it hasn't been already" do
      PidgeonsController.instance_variable_get(:@list).should eq nil
      list = PidgeonsController.list
      list.should be_a Outpost::List::Base
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
outpost-cms-0.1.4 spec/lib/controller_spec.rb
outpost-cms-0.1.3 spec/lib/controller_spec.rb
outpost-cms-0.1.2 spec/lib/controller_spec.rb
outpost-cms-0.1.1 spec/lib/controller_spec.rb
outpost-cms-0.1.0 spec/lib/controller_spec.rb
outpost-cms-0.0.5 spec/lib/controller_spec.rb
outpost-cms-0.0.4 spec/lib/controller_spec.rb
outpost-cms-0.0.3 spec/lib/controller_spec.rb