diff options
author | Lee Jarvis <lee@jarvis.co> | 2011-04-27 08:08:24 +0100 |
---|---|---|
committer | Lee Jarvis <lee@jarvis.co> | 2011-04-27 08:08:24 +0100 |
commit | 22040dcc37de409f90b780bad6940bdc7e39e536 (patch) | |
tree | 08c5bee6b8b9bde182dadef7d9fd35a10c778012 | |
parent | 4b63d91a971ed21083c9e58f441b92439d7f529a (diff) | |
download | slop-22040dcc37de409f90b780bad6940bdc7e39e536.tar.gz |
push test into the load path before running tests
-rw-r--r-- | Rakefile | 1 | ||||
-rw-r--r-- | test/commands_test.rb | 2 | ||||
-rw-r--r-- | test/option_test.rb | 2 | ||||
-rw-r--r-- | test/slop_test.rb | 2 |
4 files changed, 4 insertions, 3 deletions
@@ -1,4 +1,5 @@ task :test do + $LOAD_PATH.unshift './test' Dir.glob("test/**/*_test.rb").each { |test| require "./#{test}" } end diff --git a/test/commands_test.rb b/test/commands_test.rb index fb30fda..16f57cb 100644 --- a/test/commands_test.rb +++ b/test/commands_test.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require 'helper' class CommandsTest < TestCase test 'creating commands' do diff --git a/test/option_test.rb b/test/option_test.rb index 3d2728c..c60d99a 100644 --- a/test/option_test.rb +++ b/test/option_test.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require 'helper' class OptionTest < TestCase def option(*args, &block) diff --git a/test/slop_test.rb b/test/slop_test.rb index 2465580..1e62632 100644 --- a/test/slop_test.rb +++ b/test/slop_test.rb @@ -1,4 +1,4 @@ -require File.expand_path('../helper', __FILE__) +require 'helper' class SlopTest < TestCase def clean_options(*args) |