Permalink
Browse files

simplify running tests

  • Loading branch information...
1 parent 5446189 commit fc5db6115d84c3f5513600648ed5def6c923220f @takahashim takahashim committed Dec 26, 2016
Showing with 11 additions and 6 deletions.
  1. +2 −6 Rakefile
  2. +9 −0 test/run_test.rb
View
@@ -6,7 +6,6 @@ rescue LoadError
end
require 'rubygems'
-require 'rake/testtask'
require 'rake/clean'
task :default => [:test, :rubocop]
@@ -20,11 +19,8 @@ task :rubocop do
end
end
-Rake::TestTask.new("test") do |t|
- t.libs << "test"
- t.test_files = Dir.glob("test/**/test_*.rb")
- t.verbose = true
- t.warning = false
+task :test do
+ ruby("test/run_test.rb")
end
begin
View
@@ -0,0 +1,9 @@
+base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
+lib_dir = File.join(base_dir, "lib")
+test_dir = File.join(base_dir, "test")
+
+$LOAD_PATH.unshift(lib_dir)
+
+require 'test/unit'
+
+exit Test::Unit::AutoRunner.run(true, test_dir)

0 comments on commit fc5db61

Please sign in to comment.