Sha256: 737d59e625d8544a7c1a4efd08a8c7206a9bc2579619babacb41eff6f3193fee

Contents?: true

Size: 838 Bytes

Versions: 15

Compression:

Stored size: 838 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
      $stderr.puts "In order to run #{name}, do: gem install rspec"
    end
  end
end

task test: :spec

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
devtools-0.1.18 tasks/spec.rake
devtools-0.1.16 tasks/spec.rake
devtools-0.1.15 tasks/spec.rake
devtools-0.1.14 tasks/spec.rake
devtools-0.1.13 tasks/spec.rake
devtools-0.1.12 tasks/spec.rake
devtools-0.1.11 tasks/spec.rake
devtools-0.1.10 tasks/spec.rake
devtools-0.1.9 tasks/spec.rake
devtools-0.1.8 tasks/spec.rake
devtools-0.1.7 tasks/spec.rake
devtools-0.1.6 tasks/spec.rake
devtools-0.1.5 tasks/spec.rake
devtools-0.1.4 tasks/spec.rake
devtools-0.1.3 tasks/spec.rake