diff --git a/Rakefile b/Rakefile index c8cd706..baaded4 100644 --- a/Rakefile +++ b/Rakefile @@ -22,8 +22,12 @@ else task :compile end Rake::TestTask.new(:test) do |t| - ENV["RUBYOPT"] = "-I" + [*(extask.lib_dir if extask), "test/lib"].join(File::PATH_SEPARATOR) - t.libs << extask.lib_dir if extask + if extask + ENV["RUBYOPT"] = "-I" + [extask.lib_dir, "test/lib"].join(File::PATH_SEPARATOR) + t.libs << extask.lib_dir + else + ENV["RUBYOPT"] = "-Itest/lib" + end t.libs << "test/lib" t.ruby_opts << "-rhelper" t.test_files = FileList["test/**/test_*.rb"]