Permalink
Browse files

Don't require rubygems or modify load path in lib/ code

  • Loading branch information...
1 parent 8c94264 commit 823a92eb2572f33c2fa1c4f9fa261be7a1b9c863 @brynary committed Nov 9, 2009
Showing with 4 additions and 8 deletions.
  1. +3 −1 Rakefile
  2. +1 −1 features/step_definitions/features2cards_steps.rb
  3. +0 −6 lib/features2cards.rb
View
@@ -1,7 +1,9 @@
require 'rubygems'
require "rake/gempackagetask"
require "rake/clean"
-require './lib/features2cards.rb'
+
+$:.unshift('lib')
+require 'features2cards'
Dir['rake_tasks/**/*.rake'].each { |rake| load rake }
@@ -9,7 +9,7 @@
end
When /^I run features2cards (.*)$/ do |features2cards_opts|
- run "#{Features2Cards::RUBY_BINARY} #{Features2Cards::BINARY} #{features2cards_opts}"
+ run "#{Features2Cards::RUBY_BINARY} -I #{features2cards_lib_dir} -rrubygems #{Features2Cards::BINARY} #{features2cards_opts}"
end
Then /^it should (fail|pass)$/ do |success|
@@ -1,9 +1,3 @@
-require "rubygems"
-
-unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
- $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
-end
-
require "features2cards/platform"
require "features2cards/cli"

0 comments on commit 823a92e

Please sign in to comment.