Permalink
Browse files

Development env now works correctly with bundler.

  • Loading branch information...
1 parent 3ad7d2b commit 045bc7de24a8a61691af560fb296bd92a307dd24 @dchelimsky dchelimsky committed Jun 21, 2010
Showing with 33 additions and 4 deletions.
  1. +8 −0 Gemfile
  2. +3 −1 Rakefile
  3. +19 −0 features/support/env.rb
  4. +3 −3 spec/spec_helper.rb
View
@@ -0,0 +1,8 @@
+gem "rake"
+gem "jeweler"
+gem "cucumber"
+gem "aruba"
+gem "autotest"
+gem "rspec-mocks", :path => "."
+gem "rspec-core", :path => "../rspec-core"
+gem "rspec-expectations", :path => "../rspec-expectations"
View
@@ -1,4 +1,6 @@
-$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
+require "bundler"
+Bundler.setup
+
require 'rake'
require 'rspec/mocks/version'
View
@@ -1,2 +1,21 @@
+require 'bundler'
+Bundler.setup
+
require 'aruba'
require 'rspec/expectations'
+
+module ArubaOverrides
+ def detect_ruby_script(cmd)
+ if cmd =~ /^rspec /
+ "bundle exec ../../../rspec-core/bin/#{cmd}"
+ elsif cmd =~ /^ruby /
+ "bundle exec #{cmd}"
+ else
+ super(cmd)
+ end
+ end
+end
+
+World(ArubaOverrides)
+
+
View
@@ -1,6 +1,6 @@
-$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
-$LOAD_PATH << File.expand_path('../../../rspec-core/lib', __FILE__)
-$LOAD_PATH << File.expand_path('../../../rspec-expectations/lib', __FILE__)
+require 'bundler'
+Bundler.setup
+
require 'rspec/core'
require 'rspec/mocks'
require 'rspec/expectations'

0 comments on commit 045bc7d

Please sign in to comment.