Sha256: 9044590670ee971f6b5a9fd090cd69516c0f1bc6a31b82707b85c4987f3cd738

Contents?: true

Size: 982 Bytes

Versions: 1

Compression:

Stored size: 982 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}"
  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

1 entries across 1 versions & 1 rubygems

Version Path
howitzer-1.0.1 generators/rspec/templates/rspec.rake