diff --git a/Rakefile b/Rakefile index d732415ce..06e890536 100644 --- a/Rakefile +++ b/Rakefile @@ -8,8 +8,10 @@ load "lib/tasks/active_fedora_dev.rake" CLEAN.include %w(**/.DS_Store tmp *.log *.orig *.tmp **/*~) +desc 'setup jetty and run tests' task ci: ['jetty:clean', 'active_fedora:ci'] -task spec: ['active_fedora:rspec'] +desc 'run tests' +task spec: ['active_fedora:rubocop', 'active_fedora:rspec'] task rcov: ['active_fedora:rcov'] task default: [:ci] diff --git a/lib/tasks/active_fedora_dev.rake b/lib/tasks/active_fedora_dev.rake index af255187e..b2d7518fc 100644 --- a/lib/tasks/active_fedora_dev.rake +++ b/lib/tasks/active_fedora_dev.rake @@ -23,10 +23,9 @@ namespace :active_fedora do end require 'rspec/core/rake_task' - task rspec: :rubocop do - RSpec::Core::RakeTask.new(:rspec) do |spec| - spec.rspec_opts = ['--backtrace'] if ENV['CI'] - end + desc 'Run tests only' + RSpec::Core::RakeTask.new(:rspec) do |spec| + spec.rspec_opts = ['--backtrace'] if ENV['CI'] end require 'rubocop/rake_task' @@ -62,7 +61,7 @@ namespace :active_fedora do end desc "Execute specs with coverage" - task :coverage do + task coverage: :rubocop do # Put spec opts in a file named .rspec in root ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby" ENV['COVERAGE'] = 'true' unless ruby_engine == 'jruby'