Sha256: f98b6f161851ba32bdd7a81317d48470ccdfac772b5910669f908e0a91a673f3

Contents?: true

Size: 830 Bytes

Versions: 8

Compression:

Stored size: 830 Bytes

Contents

begin
  require 'rspec/core/rake_task'

  # Remove existing same-named tasks
  %w[spec spec:unit spec:integration].each do |task|
    klass = Rake::Task
    klass[task].clear if klass.task_defined?(task)
  end

  desc 'Run all specs'
  RSpec::Core::RakeTask.new(:spec) do |task|
    task.pattern = 'spec/{unit,integration}/**/*_spec.rb'
  end

  namespace :spec do
    desc 'Run unit specs'
    RSpec::Core::RakeTask.new(:unit) do |task|
      task.pattern = 'spec/unit/**/*_spec.rb'
    end

    desc 'Run integration specs'
    RSpec::Core::RakeTask.new(:integration) do |task|
      task.pattern = 'spec/integration/**/*_spec.rb'
    end
  end
rescue LoadError
  %w[spec spec:unit spec:integration].each do |name|
    task name do
      warn "In order to run #{name}, do: gem install rspec"
    end
  end
end

task test: :spec

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
devtools-0.1.26 tasks/spec.rake
devtools-0.1.25 tasks/spec.rake
devtools-0.1.24 tasks/spec.rake
devtools-0.1.23 tasks/spec.rake
devtools-0.1.22 tasks/spec.rake
devtools-0.1.21 tasks/spec.rake
devtools-0.1.20 tasks/spec.rake
devtools-0.1.19 tasks/spec.rake