tasks/test.rake in nanoc-3.8.0 vs tasks/test.rake in nanoc-4.0.0a1
- old
+ new
@@ -1,7 +1,9 @@
# encoding: utf-8
+require 'rspec/core/rake_task'
+
def run_tests(dir_glob)
ENV['ARGS'] ||= ''
ENV['QUIET'] ||= 'true'
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/..'))
@@ -30,7 +32,11 @@
run_tests "test/#{dir}/**/"
end
end
end
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.rspec_opts = '-r ./spec/spec_helper.rb --color'
+end
+
desc 'Alias for test:all + rubocop'
-task test: [:'test:all', :rubocop]
+task test: [:spec, :'test:all', :rubocop]