Skip to content

Commit 70dabff

Browse files
committed
Validate ruby files under spec/
1 parent 0c963e3 commit 70dabff

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Rakefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ PuppetLint.configuration.send('disable_class_inherits_from_params_class')
1717
PuppetLint.configuration.send('disable_class_parameter_defaults')
1818
PuppetLint.configuration.send('disable_documentation')
1919
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
20-
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
2120

2221
exclude_paths = [
2322
"pkg/**/*",
@@ -27,6 +26,13 @@ exclude_paths = [
2726
PuppetLint.configuration.ignore_paths = exclude_paths
2827
PuppetSyntax.exclude_paths = exclude_paths
2928

29+
desc 'Validate manifests, templates, ruby files and shell scripts'
30+
task :validate do
31+
Dir['spec/**/*.rb'].each do |ruby_file|
32+
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
33+
end
34+
end
35+
3036
desc "Run acceptance tests"
3137
RSpec::Core::RakeTask.new(:acceptance) do |t|
3238
t.pattern = 'spec/acceptance'

0 commit comments

Comments
 (0)