Sha256: 74134c03683304178235df257ba6ae2c4fd1ad250d28e3ff56ea6b2073f2c20f

Contents?: true

Size: 1.21 KB

Versions: 5

Compression:

Stored size: 1.21 KB

Contents

begin
  require "rspec/core/rake_task"
  desc "Run RSpec code examples"
  RSpec::Core::RakeTask.new(:regression_test) do |t|
    # Glob pattern to match files.
    t.pattern = "spec/regression/**/test_*.rb"

    # Whether or not to fail Rake when an error occurs (typically when 
    # examples fail).
    t.fail_on_error = true

    # A message to print to stderr when there are failures.
    t.failure_message = nil

    # Use verbose output. If this is set to true, the task will print the
    # executed spec command to stdout.
    t.verbose = true

    # Use rcov for code coverage?
    t.rcov = false

    # Path to rcov.
    t.rcov_path = "rcov"

    # Command line options to pass to rcov. See 'rcov --help' about this
    t.rcov_opts = []

    # Command line options to pass to ruby. See 'ruby --help' about this 
    t.ruby_opts = []

    # Path to rspec
    t.rspec_path = "rspec"

    # Command line options to pass to rspec. See 'rspec --help' about this
    t.rspec_opts = ["--color", "--backtrace"]
  end
rescue LoadError => ex
  task :regression_test do
    abort 'rspec is not available. In order to run spec, you must: gem install rspec'
  end
ensure
  task :spec => [:regression_test]
  task :test => [:regression_test]
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-0.12.2 tasks/regression_test.rake
alf-0.12.1 tasks/regression_test.rake
alf-0.12.0 tasks/regression_test.rake
alf-0.11.1 tasks/regression_test.rake
alf-0.11.0 tasks/regression_test.rake