title: Testing your ActiveAdmin resources with RSpec
body: <p>I am new to Rails. I want to test my activeadmin resources as mentioned in the following link</p>
  
  <p><a href="https://github.com/activeadmin/activeadmin/wiki/Testing-your-ActiveAdmin-controllers-with-RSpec" rel="nofollow">https://github.com/activeadmin/activeadmin/wiki/Testing-your-ActiveAdmin-controllers-with-RSpec</a></p>
  
  <p>My simple test as follows</p>
  
  <pre><code>require 'spec_helper'
  
  describe "activeadmin resources" do
  
    it "should have admin user resource" do
  
      ActiveAdmin.application.namespaces[:admin].resources.should have_key("AdminUser")
  
    end
  
  end
  </code></pre>
  
  <p>But I am getting the error</p>
  
  <pre><code>NameError: uninitialized constant ActiveAdmin`
  </code></pre>
  
  <p>I tried to require activeadmin gem in spec_helper, but no use. Any idea?</p>