Rakefile in staticpress-0.5.2 vs Rakefile in staticpress-0.6.0

- old
+ new

@@ -1,24 +1,11 @@ require 'bundler/gem_tasks' -require 'pathname' +require 'rake/testtask' task :default => [ :tests ] -desc 'Run all tests in path specified (defaults to tests). Tell Rake to start at a specific path with `rake tests[\'tests/lib/staticpress/content\']`' -task :tests, :path do |t, args| - args.with_defaults(:path => 'tests') - - run_recursively = lambda do |dir| - Pathname(dir).expand_path.children.each do |dir_or_test| - if dir_or_test.directory? - run_recursively.call dir_or_test - elsif dir_or_test.to_s.end_with? '_test.rb' - require_relative dir_or_test - end - end - end - - run_recursively.call args[:path] +Rake::TestTask.new(:tests) do |t| + t.pattern = 'tests/**/*_test.rb' end desc 'Enumerate annotations. Optionally takes a pipe-separated list of tags to process' task :notes, :types do |t, args| args.with_defaults :types => 'FIXME|TODO'