title: How to include lib directory in rspec tests
body: <p>I am having a problem in testing my gem which includes a <code>lib</code> directory, on JRuby 1.7.4.</p>
  
  <p>I want to test a file located at <code>lib/vger/resources/account_manager.rb</code></p>
  
  <p>My spec file is in <code>spec/vger/resources/account_manager_spec.rb</code></p>
  
  <pre><code>require 'spec_helper'
  
  describe Vger::Resources::AccountManager do     
      .
      .
      end 
  end
  </code></pre>
  
  <p>I am trying to include the file which I want to test in <code>spec_helper.rb</code></p>
  
  <pre><code>require 'rubygems'
  require 'bundler/setup'
  require 'vger/resources/account_manager'
  require 'vger'
  
  RSpec.configure do |config|
    # some (optional) config here
  end
  </code></pre>
  
  <p>While running the test by the command <code>rspec spec/vger/resources/account_manager_spec.rb</code> I am getting this error:</p>
  
  <pre><code>NameError: uninitialized constant Vger::Resources
      const_missing at org/jruby/RubyModule.java:2631
  </code></pre>
  
  <p>I seems that the file which I want to test is not getting loaded. Please tell me where I am going wrong and where should I make corrections.</p>