Skip to content

Commit

Permalink
Use rake as test runner instead of custom script
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Brasic committed Dec 23, 2021
1 parent ba65028 commit 709bf4b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require "rake/testtask"

task default: "test"

Rake::TestTask.new do |t|
t.test_files = FileList['test/test_helper.rb', 'test/**/*_test.rb']
end
1 change: 1 addition & 0 deletions scientist.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ Gem::Specification.new do |gem|

gem.add_development_dependency "minitest", "~> 5.8"
gem.add_development_dependency "coveralls", "~> 0.8"
gem.add_development_dependency "rake"
end
7 changes: 1 addition & 6 deletions script/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,4 @@
set -e

cd $(dirname "$0")/..
script/bootstrap && bundle exec ruby -I lib \
-e 'require "bundler/setup"' \
-e 'require "coveralls"; Coveralls.wear!{ add_filter ".bundle" }' \
-e 'require "minitest/autorun"' \
-e 'require "scientist"' \
-e '(ARGV.empty? ? Dir["test/**/*_test.rb"] : ARGV).each { |f| load f }' -- "$@"
script/bootstrap && bundle exec rake test
4 changes: 4 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require "minitest/autorun"

$LOAD_PATH.unshift(File.expand_path(File.join(__dir__, "../lib")))
require "scientist"

0 comments on commit 709bf4b

Please sign in to comment.