Skip to content

Commit

Permalink
Validate ruby files under spec/
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoneycutt committed Jul 5, 2017
1 parent 0c963e3 commit 70dabff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

exclude_paths = [
"pkg/**/*",
Expand All @@ -27,6 +26,13 @@ exclude_paths = [
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths

desc 'Validate manifests, templates, ruby files and shell scripts'
task :validate do
Dir['spec/**/*.rb'].each do |ruby_file|
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
end
end

desc "Run acceptance tests"
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
Expand Down

0 comments on commit 70dabff

Please sign in to comment.