title: How do I setup RSpec with a gem that has an activerecord model in it?
body: <p>We are extracting a few models into a gem so it can be shared among a couple different services and we aren't able to get rspec running in the gem.  When we require the gemname in the spec_helper it errors saying:</p>
  
  <pre><code>uninitialized constant Object::ActiveRecord
  </code></pre>
  
  <p><strong>Some of the file contents are below. Any ideas?</strong></p>
  
  <p>Right now the spec helper is as follows:</p>
  
  <pre><code>require 'rubygems'
  require 'bundler/setup'
  
  RSpec.configure do |config|
    Bundler.require(:default,"test")
    require 'tup-user' # and any other gems you need
  end
  </code></pre>
  
  <p>Our Gemfile is:</p>
  
  <pre><code>source :rubygems
  
  # Specify your gem's dependencies in tup-user.gemspec
  gemspec
  
  gem 'rspec-rails'
  gem 'aasm'
  gem 'authlogic'
  gem 'rails'
  </code></pre>
  
  <p>The line the error is being thrown on is the first of the class:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
  </code></pre>