Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 23b5f83a66
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (21 sloc) 0.867 kb
require 'spec_helper'
describe ActiveAdmin, "filters" do
describe "before filters" do
it "should add a new before filter to ActiveAdmin::ResourceController" do
ActiveAdmin::ResourceController.should_receive(:before_filter).and_return(true)
ActiveAdmin.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)
ActiveAdmin.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)
ActiveAdmin.around_filter :my_filter, :only => :show
end
end
end
Jump to Line
Something went wrong with that request. Please try again.