Sha256: e75774e51679b5a5a3566083f9d524ab3268ceef1a3106c42fb274474f9a57a9
Contents?: true
Size: 1.31 KB
Versions: 5
Compression:
Stored size: 1.31 KB
Contents
require 'spec_helper' describe ActiveAdmin::Application do let(:application){ ActiveAdmin::Application.new } let(:controllers){ [ActiveAdmin::BaseController, ActiveAdmin::Devise::SessionsController, ActiveAdmin::Devise::UnlocksController, ActiveAdmin::Devise::PasswordsController] } it 'before_filter' do controllers.each{ |c| expect(c).to receive(:before_filter).and_return(true) } application.before_filter :my_filter, only: :show end it 'skip_before_filter' do controllers.each{ |c| expect(c).to receive(:skip_before_filter).and_return(true) } application.skip_before_filter :my_filter, only: :show end it 'after_filter' do controllers.each{ |c| expect(c).to receive(:after_filter).and_return(true) } application.after_filter :my_filter, only: :show end it 'skip after_filter' do controllers.each{ |c| expect(c).to receive(:skip_after_filter).and_return(true) } application.skip_after_filter :my_filter, only: :show end it 'around_filter' do controllers.each{ |c| expect(c).to receive(:around_filter).and_return(true) } application.around_filter :my_filter, only: :show end it 'skip_filter' do controllers.each{ |c| expect(c).to receive(:skip_filter).and_return(true) } application.skip_filter :my_filter, only: :show end end
Version data entries
5 entries across 5 versions & 2 rubygems