Sha256: 2f0a72990137bc9123ea44a7762e1c6a6c720d9ba19efa1f2519497b763b2b69
Contents?: true
Size: 919 Bytes
Versions: 2
Compression:
Stored size: 919 Bytes
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 "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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
saulolso-activeadmin-0.2.2.1 | spec/unit/controller_filters_spec.rb |
saulolso-activeadmin-0.2.2 | spec/unit/controller_filters_spec.rb |