Rakefile in nanoc-4.4.5 vs Rakefile in nanoc-4.4.6
- old
+ new
@@ -1,32 +1,20 @@
require 'rubocop/rake_task'
require 'rspec/core/rake_task'
require 'rake/testtask'
require 'coveralls/rake/task'
-RuboCop::RakeTask.new(:rubocop) do |task|
- task.options = %w(--display-cop-names --format simple)
- task.patterns = ['bin/nanoc', 'lib/**/*.rb', 'spec/**/*.rb', 'test/**/*.rb']
-end
+RuboCop::RakeTask.new(:rubocop)
Coveralls::RakeTask.new
-SUBDIRS = %w(* base checking cli data_sources deploying extra filters helpers).freeze
-
-namespace :test do
- SUBDIRS.each do |dir|
- Rake::TestTask.new(dir == '*' ? 'all' : dir) do |t|
- t.test_files = Dir["test/#{dir}/**/*_spec.rb"] + Dir["test/#{dir}/**/test_*.rb"]
- t.libs = ['./lib', '.']
- t.ruby_opts = ['-r./test/helper']
- end
- end
+Rake::TestTask.new(:test_all) do |t|
+ t.test_files = Dir['test/**/*_spec.rb'] + Dir['test/**/test_*.rb']
+ t.libs << 'test'
end
-RSpec::Core::RakeTask.new(:spec) do |t|
- t.verbose = false
-end
+RSpec::Core::RakeTask.new(:spec)
-desc 'Run all tests and specs'
-task test: [:spec, :'test:all', :'coveralls:push']
+task test: [:spec, :test_all, :rubocop]
+task test_ci: [:test, :'coveralls:push']
-task default: [:test, :rubocop]
+task default: :test