Sha256: cd7c5fd9b086f0b69e3d6b39efc0d9381e8b3984b8dc4aebce6943d42ecb86c0

Contents?: true

Size: 1.23 KB

Versions: 3

Compression:

Stored size: 1.23 KB

Contents

require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
require 'rspec'
require 'rspec/core/rake_task'

namespace 'test' do
  UNIT_TESTS = FileList['spec/reek/**/*_spec.rb']

  RSpec::Core::RakeTask.new('spec') do |t|
    t.pattern = UNIT_TESTS
    t.rspec_opts = ['--color']
    t.ruby_opts = ['-Ilib']
    t.rcov = false
  end

  desc 'Tests various release attributes of the gem'
  RSpec::Core::RakeTask.new('gem') do |t|
    t.pattern = FileList['spec/gem/**/*_spec.rb']
    t.rcov = false
  end

  desc 'Tests code quality'
  RSpec::Core::RakeTask.new('quality') do |t|
    t.pattern = FileList['quality/**/*_spec.rb']
    t.rspec_opts = ['--color']
    t.ruby_opts = ['-Ilib']
    t.rcov = false
  end

  desc 'Runs all unit tests under RCov'
  RSpec::Core::RakeTask.new('rcov') do |t|
    t.pattern = UNIT_TESTS
    t.rcov = true
    t.rcov_opts = '-o build/coverage'
  end

  Cucumber::Rake::Task.new(:features) do |t|
    t.cucumber_opts = "features --format progress --color"
  end

  desc 'Runs all unit tests and acceptance tests'
  task 'all' => ['test:spec', 'test:features']
end

task 'clobber_rcov' => 'test:clobber_rcov'

desc 'Synonym for test:spec'
task 'spec' => 'test:spec'

desc 'Synonym for test:all'
task 'test' => 'test:all'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reek-1.3.1 tasks/test.rake
reek-1.3 tasks/test.rake
reek-1.2.13 tasks/test.rake