Sha256: bbdc1d0881ab95cbc0ae33d3fd1bf66c82abb2e8671892f007b71861427aca40

Contents?: true

Size: 1013 Bytes

Versions: 3

Compression:

Stored size: 1013 Bytes

Contents

require 'rspec'
require 'rspec/core/rake_task'
include RSpec::Core

# Specify here your group tests
TEST_TYPES = [:all, :health, :bvt, :p1]

# Specify here your business areas, ex. [:accounts, :blog, :news]
TEST_AREAS = []

namespace :rspec do
  std_opts = "--format html --out=./#{settings.log_dir}/#{settings.html_log} --format documentation --color"
  TEST_TYPES.each do |type|
    RakeTask.new(type) do |s|
      s.send :desc, "Run all #{"'#{s.name}' " unless type == :all}tests"
      s.pattern = "./spec/#{type == :all ? '**': s.name}/**/*_spec.rb"
      s.rspec_opts = std_opts
      s.verbose = true
    end
    TEST_AREAS.each do |group|
      type_text = type == :all ? '**': type
      pattern = "./spec/#{type_text}/#{group}/**/*_spec.rb"
      RakeTask.new("#{"#{type}:" unless type == :all}#{group}") do |s|
        s.send :desc, "Run all '#{s.name}' tests"
        s.pattern = pattern
        s.rspec_opts = std_opts
        s.verbose = true
      end
    end
  end

end

task default: "rspec:all"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
howitzer-1.1.1 generators/rspec/templates/rspec.rake
howitzer-1.1.0 generators/rspec/templates/rspec.rake
howitzer-1.0.2 generators/rspec/templates/rspec.rake