diff options
Diffstat (limited to 'spec/unit/cookbook/syntax_check_spec.rb')
-rw-r--r-- | spec/unit/cookbook/syntax_check_spec.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/unit/cookbook/syntax_check_spec.rb b/spec/unit/cookbook/syntax_check_spec.rb index 02762535ce..0cf4382f56 100644 --- a/spec/unit/cookbook/syntax_check_spec.rb +++ b/spec/unit/cookbook/syntax_check_spec.rb @@ -38,7 +38,7 @@ describe Chef::Cookbook::SyntaxCheck do recipes/default.rb recipes/gigantor.rb recipes/one.rb - recipes/return.rb }.map{ |f| File.join(cookbook_path, f) } + recipes/return.rb }.map { |f| File.join(cookbook_path, f) } end before do @@ -48,7 +48,7 @@ describe Chef::Cookbook::SyntaxCheck do @attr_files = %w{default.rb smokey.rb}.map { |f| File.join(cookbook_path, "attributes", f) } @libr_files = %w{openldap.rb openldap/version.rb}.map { |f| File.join(cookbook_path, "libraries", f) } - @defn_files = %w{client.rb server.rb}.map { |f| File.join(cookbook_path, "definitions", f)} + @defn_files = %w{client.rb server.rb}.map { |f| File.join(cookbook_path, "definitions", f) } @recipes = %w{default.rb gigantor.rb one.rb return.rb}.map { |f| File.join(cookbook_path, "recipes", f) } @ruby_files = @attr_files + @libr_files + @defn_files + @recipes + [File.join(cookbook_path, "metadata.rb")] basenames = %w{ helpers_via_partial_test.erb @@ -62,7 +62,7 @@ describe Chef::Cookbook::SyntaxCheck do some_windows_line_endings.erb all_windows_line_endings.erb no_windows_line_endings.erb } - @template_files = basenames.map { |f| File.join(cookbook_path, "templates", "default", f)} + @template_files = basenames.map { |f| File.join(cookbook_path, "templates", "default", f) } end after do @@ -104,7 +104,6 @@ describe Chef::Cookbook::SyntaxCheck do it "lists the erb templates in the cookbook" do expect(syntax_check.template_files.sort).to eq(@template_files.sort) end - end describe "when validating cookbooks" do @@ -171,9 +170,8 @@ describe Chef::Cookbook::SyntaxCheck do it "does not remove the invalid template from the list of untested templates" do expect(syntax_check.untested_template_files).to include(File.join(cookbook_path, "templates", "default", "borken.erb")) - expect {syntax_check.validate_templates}.not_to change(syntax_check, :untested_template_files) + expect { syntax_check.validate_templates }.not_to change(syntax_check, :untested_template_files) end - end describe "and an ignored file has a syntax error" do @@ -192,9 +190,7 @@ describe Chef::Cookbook::SyntaxCheck do expect(syntax_check.validate_ruby_files).to be_truthy expect(syntax_check.untested_ruby_files).to be_empty end - end - end describe "and the files have been syntax checked previously" do |