require "rspec/core/rake_task"

desc "Run all rspec tests in spec directory"
RSpec::Core::RakeTask.new(:spec) do |t|
  t.rspec_opts = [
    "-f", "d", # Use documentation formatter, for looking at tests locally
    "-P", "../spec/**/*_spec.rb"
  ]
end

namespace :spec do
  desc "Run unit tests for Cucumber test harness/helpers"
  RSpec::Core::RakeTask.new(:test_the_tests) do |t|
    t.rspec_opts = [
      "-f", "p", # Used by CI server
      "-P", "../spec/**/*_spec.rb"
    ]
  end
end
