
Add and document 'rake acceptance' task for rspec spec/acceptance spec tests. Change-Id: Iedcda73fa67b90ed2150c4d2356699061b53eff9
22 lines
765 B
Ruby
22 lines
765 B
Ruby
require 'puppetlabs_spec_helper/rake_tasks'
|
|
require 'puppet-lint/tasks/puppet-lint'
|
|
require 'puppet-syntax/tasks/puppet-syntax'
|
|
|
|
PuppetSyntax.exclude_paths ||= []
|
|
PuppetSyntax.exclude_paths << "spec/fixtures/**/*"
|
|
PuppetSyntax.exclude_paths << "pkg/**/*"
|
|
PuppetSyntax.exclude_paths << "vendor/**/*"
|
|
|
|
Rake::Task[:lint].clear
|
|
PuppetLint::RakeTask.new :lint do |config|
|
|
config.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"]
|
|
config.fail_on_warnings = true
|
|
config.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}'
|
|
config.disable_checks = <% @configs['default_disabled_lint_checks'] + ( @configs['extra_disabled_lint_checks'] || [] ) -%>
|
|
end
|
|
|
|
desc "Run acceptance tests"
|
|
RSpec::Core::RakeTask.new(:acceptance) do |t|
|
|
t.pattern = 'spec/acceptance'
|
|
end
|