Permalink
Browse files

Fix test task on Ruby 1.9

  • Loading branch information...
1 parent 88c56ea commit 21a0952a79ff9f6c6ab3de932f2405fe4c78ec39 @mnaberez committed Feb 14, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 Rakefile
View
@@ -1,11 +1,15 @@
-$LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'lib')
-$LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'test')
+here = File.expand_path('..', __FILE__)
+$LOAD_PATH.unshift File.join(here, 'lib')
+$LOAD_PATH.unshift File.join(here, 'test')
desc "Run tests"
task :test do
require 'tdms'
require 'test_helper'
- Dir['test/**/*_test.rb'].each { |file| require file }
+
+ Dir.chdir(File.join(here, 'test')) do
+ Dir['**/*_test.rb'].each { |file| require file }
+ end
end
task :default => [:test]

0 comments on commit 21a0952

Please sign in to comment.