Sha256: 9abad08b43a9595ba89168f4f1e46d4685681a439e3b2828b6111d346c457aaf

Contents?: true

Size: 1.15 KB

Versions: 47

Compression:

Stored size: 1.15 KB

Contents

require 'spec_helper' 

describe ActiveAdmin, "filters" do
  let(:application){ ActiveAdmin::Application.new }

  describe "before filters" do
    it "should add a new before filter to ActiveAdmin::BaseController" do
      ActiveAdmin::BaseController.should_receive(:before_filter).and_return(true)
      application.before_filter :my_filter, :only => :show
    end
  end
  
  describe "skip before filters" do
    it "should add a new skip before filter to ActiveAdmin::BaseController" do
      ActiveAdmin::BaseController.should_receive(:skip_before_filter).and_return(true)
      application.skip_before_filter :my_filter, :only => :show
    end
  end

  describe "after filters" do
    it "should add a new after filter to ActiveAdmin::BaseController" do
      ActiveAdmin::BaseController.should_receive(:after_filter).and_return(true)
      application.after_filter :my_filter, :only => :show
    end
  end

  describe "around filters" do
    it "should add a new around filter to ActiveAdmin::BaseController" do
      ActiveAdmin::BaseController.should_receive(:around_filter).and_return(true)
      application.around_filter :my_filter, :only => :show
    end
  end

end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
lalala-4.0.0.dev.141 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.128 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.126 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.125 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.124 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.123 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.118 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.116 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.114 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.113 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.111 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.109 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb
lalala-4.0.0.dev.107 vendor/deps/active_admin/spec/unit/controller_filters_spec.rb