Sha256: 3242dbb3c953f4c5ac8d4f947bea529251e9172dfd76ad6a43beb443ce99bac2

Contents?: true

Size: 1.63 KB

Versions: 19

Compression:

Stored size: 1.63 KB

Contents

require 'spec_helper'

describe CakesController, :type => :controller do

  describe '#show' do
    it 'should get the power :cakes' do
      controller.should_receive(:observe_end_of_association_chain).with(:cakes)
      get :show, :id => 'id'
    end
  end

  describe '#index' do
    it 'should get the power :cakes' do
      controller.should_receive(:observe_end_of_association_chain).with(:cakes)
      get :index
    end
  end

  describe '#new' do
    it 'should get the power :creatable_cakes' do
      controller.should_receive(:observe_end_of_association_chain).with(:creatable_cakes)
      get :new
    end
  end

  describe '#creatable' do
    it 'should get the power :creatable_cakes' do
      controller.should_receive(:observe_end_of_association_chain).with(:creatable_cakes)
      post :create
    end
  end

  describe '#edit' do
    it 'should get the power :updatable_cakes' do
      controller.should_receive(:observe_end_of_association_chain).with(:updatable_cakes)
      get :edit, :id => 'id'
    end
  end

  describe '#update' do
    it 'should get the power :updatable_cakes' do
      controller.should_receive(:observe_end_of_association_chain).with(:updatable_cakes)
      put :update, :id => 'id'
    end
  end

  describe '#destroy' do
    it 'should get the power :destroyable_cakes' do
      controller.should_receive(:observe_end_of_association_chain).with(:destroyable_cakes)
      delete :destroy, :id => '1'
    end
  end

  describe '#custom_action' do
    it 'should get the power :cakes' do
      controller.should_receive(:observe_end_of_association_chain).with(:cakes)
      get :custom_action, :id => '1'
    end
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
consul-0.12.2 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.12.1 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.12.0 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.11.2 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.11.1 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.11.0 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.10.2 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.10.1 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.10.0 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.9.1 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.9.0 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.8.0 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.7.0 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.6.1 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.6.0 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.5.0 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.4.2 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.4.1 spec/shared/consul/controllers/cakes_controller_spec.rb
consul-0.4.0 spec/shared/controllers/cakes_controller_spec.rb