title: RSpec 3, capybara 2.3.0, Guard 2.6.1, Rails 4.1.1 uninitialized constant (NameError)
body: <p>I've recently had to migrate a project from rails 4.0 to rails 4.1 and in the process I've also updated RSpec to RSpec (3.0.0).</p>
  
  <p>The project previously had the following in certain feature specs being tested with Capybara:</p>
  
  <blockquote>
    <p>require 'spec_helper' require 'support/integration_helpers.rb'<br>
    require 'support/admin_support/admin_user_creation_helpers.rb'</p>
    
    <p>include BuildDefaults</p>
  </blockquote>
  
  <p>The <code>include BuildDefaults</code> refers to a module <code>spec/support/build_defaults.rb</code> and has various helper methods to ensure that the database has been populated correctly. For some reason this has now stopped working and gives the following error (and stack trace):</p>
  
  <blockquote>
    <p>path_to/spec/features/admin_features/admin_login_out_spec.rb:4:in
    <code>&lt;top (required)&gt;': uninitialized constant BuildDefaults (NameError)
      from
    /Users/u_name/.rvm/gems/ruby-2.1.2@gemset_name/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in
    </code>block in load_spec_files'    from
    /Users/u_name/.rvm/gems/ruby-2.1.2@gemset_name/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in
    <code>each'    from
    /Users/u_name/.rvm/gems/ruby-2.1.2@gemset_name/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in
    </code>load_spec_files'     from
    /Users/u_name/.rvm/gems/ruby-2.1.2@gemset_name/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:97:in <code>setup'   from
    /Users/u_name/.rvm/gems/ruby-2.1.2@gemset_name/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:85:in</code>run'     from
    /Users/u_name/.rvm/gems/ruby-2.1.2@gemset_name/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:70:in <code>run'     from
    /Users/u_name/.rvm/gems/ruby-2.1.2@gemset_name/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:38:in</code>invoke'  from
    /Users/u_name/.rvm/gems/ruby-2.1.2@gemset_name/gems/rspec-core-3.0.2/exe/rspec:4:in
    <code>&lt;top (required)&gt;'    from
    /Users/u_name/Documents/rails/work/c_central_4.1.1/gemset_name/bin/rspec:7:in
    </code>'    from
    /Users/u_name/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
    <code>require'     from
    /Users/u_name/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
    </code>require'     from -e:1:in `'</p>
  </blockquote>
  
  <p><strong><em>Would anybody happen to know why this has happened?</em></strong></p>
  
  <p>I would greatly appreciate any help on the matter.</p>
  
  <p>I have looked at various other SO questions with a similar title as this one but none of them seem to be relevant.</p>
  
  <p><em>Side note 1</em></p>
  
  <p>It is worth noting that I have removed Spork from my test environment as it was not playing nicely for some reasons but have instead configured the project to use Spring. Though I don't think that this has anything to do with the issue, I did have to completely rebuild the test environment (running <code>rails g rspec:install</code> for instance) and then used <a href="https://github.com/yujinakayama/transpec" rel="nofollow">Transpec</a> to update the Rspec syntax.</p>