Sha256: 00ad6749b9c68764c1e070ce59c2f5a547bff04e3067969d3ca5a5c41e3daca4
Contents?: true
Size: 1.18 KB
Versions: 19
Compression:
Stored size: 1.18 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::ResourceController" do ActiveAdmin::ResourceController.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::ResourceController" do ActiveAdmin::ResourceController.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::ResourceController" do ActiveAdmin::ResourceController.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::ResourceController" do ActiveAdmin::ResourceController.should_receive(:around_filter).and_return(true) application.around_filter :my_filter, :only => :show end end end
Version data entries
19 entries across 19 versions & 3 rubygems