Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

let bundler manage the LOAD_PATH for running specs

  • Loading branch information...
commit c38d497eb9907e3bc861c11ffe0c9746903d03db 1 parent 3239eef
David Chelimsky authored July 04, 2010

Showing 1 changed file with 4 additions and 14 deletions. Show diff stats Hide diff stats

  1. 18  spec/spec_helper.rb
18  spec/spec_helper.rb
... ...
@@ -1,19 +1,9 @@
1  
-require 'rubygems'
  1
+require 'bundler'
  2
+Bundler.setup
2 3
 
3  
-$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
  4
+# TODO (DC 2010-07-04) This next line is necessary when running 'rake spec'.
  5
+# Why doesn't the rspec-core ref in Gemfile handle this.
4 6
 require 'rspec/core'
5  
-
6  
-$LOAD_PATH << File.expand_path('../../../rspec-expectations/lib', __FILE__)
7  
-$LOAD_PATH << File.expand_path('../../../rspec-mocks/lib', __FILE__)
8  
-require 'rspec/expectations'
9  
-require 'rspec/mocks'
10  
-
11  
-begin
12  
-  require 'autotest'
13  
-rescue LoadError
14  
-  raise "Could not load autotest."
15  
-end
16  
-
17 7
 require 'autotest/rspec2'
18 8
 
19 9
 Dir['./spec/support/**/*.rb'].map {|f| require f}

0 notes on commit c38d497

Please sign in to comment.
Something went wrong with that request. Please try again.