Permalink
Browse files

let bundler manage the LOAD_PATH for running specs

  • Loading branch information...
1 parent 3239eef commit c38d497eb9907e3bc861c11ffe0c9746903d03db @dchelimsky dchelimsky committed Jul 4, 2010
Showing with 4 additions and 14 deletions.
  1. +4 −14 spec/spec_helper.rb
View
@@ -1,19 +1,9 @@
-require 'rubygems'
+require 'bundler'
+Bundler.setup
-$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
+# TODO (DC 2010-07-04) This next line is necessary when running 'rake spec'.
+# Why doesn't the rspec-core ref in Gemfile handle this.
require 'rspec/core'
-
-$LOAD_PATH << File.expand_path('../../../rspec-expectations/lib', __FILE__)
-$LOAD_PATH << File.expand_path('../../../rspec-mocks/lib', __FILE__)
-require 'rspec/expectations'
-require 'rspec/mocks'
-
-begin
- require 'autotest'
-rescue LoadError
- raise "Could not load autotest."
-end
-
require 'autotest/rspec2'
Dir['./spec/support/**/*.rb'].map {|f| require f}

0 comments on commit c38d497

Please sign in to comment.