Permalink
Browse files

clean up load paths in spec helper

  • Loading branch information...
1 parent 584f3f6 commit 868c3ef3c4fd69bebd41847245f154a436e2aa74 @dchelimsky dchelimsky committed Nov 7, 2010
Showing with 5 additions and 4 deletions.
  1. +5 −4 spec/spec_helper.rb
View
9 spec/spec_helper.rb
@@ -1,16 +1,17 @@
def add_to_load_path(path, prepend=false)
- path = File.expand_path("../#{path}", __FILE__)
+ path = File.expand_path("../../#{path}/lib", __FILE__)
if prepend
$LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
else
$LOAD_PATH << path unless $LOAD_PATH.include?(path)
end
end
-add_to_load_path("../lib", :prepend)
-add_to_load_path("../../rspec-core/lib")
-add_to_load_path("../../rspec-mocks/lib")
+add_to_load_path("rspec-expectations", :prepend)
+add_to_load_path("rspec-core")
+add_to_load_path("rspec-mocks")
+require 'rspec/expectations'
require 'rspec/core'
require 'rspec/mocks'

0 comments on commit 868c3ef

Please sign in to comment.