title: ActiveAdmin/Rspec - ActionView::Template::Error (undefined method `action_methods' for nil:NilClass)
body: <p>I recently converted my tests from using Cucumber/Capybara to Rspec/Capybara. I am using ActiveAdmin. When I ran tests against ActiveAdmin with Cucumber, the tests run, everything passes. When I run tests with Rspec, I receive:</p>
  
  <pre><code>Rendered /home/vagrant/.rvm/gems/ruby-2.0.0-p451/bundler/gems/active_admin-d11c0a56504a/app/views/active_admin/resource/index.html.arb (210.6ms)
  Completed 500 Internal Server Error in 244ms
  
  ActionView::Template::Error (undefined method `action_methods' for nil:NilClass):
      1: insert_tag renderer_for(:index)
    authlogic (3.4.2) lib/authlogic/controller_adapters/abstract_adapter.rb:63:in `method_missing'
    /home/vagrant/.rvm/gems/ruby-2.0.0-p451/bundler/gems/active_admin-d11c0a56504a/lib/active_admin/resource/action_items.rb:55:in `block in add_default_action_items'
    /home/vagrant/.rvm/gems/ruby-2.0.0-p451/bundler/gems/active_admin-d11c0a56504a/lib/active_admin/views/action_items.rb:9:in `instance_exec'
    /home/vagrant/.rvm/gems/ruby-2.0.0-p451/bundler/gems/active_admin-d11c0a56504a/lib/active_admin/views/action_items.rb:9:in `block (2 levels) in build'
    arbre (1.0.1) lib/arbre/element/builder_methods.rb:31:in `block in build_tag'
    arbre (1.0.1) lib/arbre/context.rb:92:in `with_current_arbre_element'
    arbre (1.0.1) lib/arbre/element/builder_methods.rb:49:in `with_current_arbre_element'
    arbre (1.0.1) lib/arbre/element/builder_methods.rb:26:in `build_tag'
    arbre (1.0.1) lib/arbre/element/builder_methods.rb:39:in `insert_tag'
    arbre (1.0.1) lib/arbre/element/builder_methods.rb:14:in `span'
  </code></pre>
  
  <p>That is only ten lines of the traceback. It's actually much bigger. Let me know if I should paste that. </p>
  
  <p>What is different in rspec that is causing this error? </p>
  
  <p>I am using rspec (2.14.1), activeadmin (master), ruby (2.0), rails (4.1.1).</p>
  
  <p>Thanks.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Here is my activeadmin resource:</p>
  
  <pre><code>ActiveAdmin.register UserPermission, :as =&gt; 'Support User' do
    config.batch_actions = false
    config.clear_action_items!
    config.filters = false
  
    actions :new, :create, :index, :destroy  
  
    action_item only: [:index] do
      link_to 'Add Support User', new_admin_support_user_path
    end
  
    controller do
      def scoped_collection
        UserPermission.where(permission: 'support')
      end
  
      def destroy
        begin
          permission = UserPermission.find_by_id_and_permission!(
          params[:id], UserPermission::SUPPORT)
          permission.destroy if permission.present?
          redirect_to admin_support_users_path, notice: 'Support user removed.'
        rescue ActiveRecord::RecordNotFound
          redirect_to admin_support_users_path, alert: 'Support user not found.'
        end
      end
  
      def create
        user = User.find_by_email(params[:email])
        if user
          UserPermission.create(:user_id =&gt; user.id,
            :permission =&gt; UserPermission::SUPPORT,
            :creator =&gt; current_user)
          redirect_to admin_support_users_path, notice: 'Support user added.'
        else
          redirect_to new_admin_support_user_path, alert: 'User not found'
        end
      end
    end
  
    form partial: "form"
  
    index :download_links =&gt; false do
      column :email do |permission|
        permission.user.email
      end
      column :created_by do |permission|
        if permission.created_by.present?
          u = User.find_by_id(permission.created_by)
          u.email 
        end
      end
      column :created_at
      actions
    end
  
    menu :parent =&gt; 'Users', :priority =&gt; 1
  
  end
  </code></pre>