summaryrefslogtreecommitdiff
path: root/spec/unit/cookbook/syntax_check_spec.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2012-12-21 12:03:06 -0800
committerdanielsdeleo <dan@opscode.com>2012-12-21 12:15:18 -0800
commit67a74e5029c5db0bffc63a4709ecf125353a247c (patch)
treefeb242f938087fede75073c22f119691829c7b24 /spec/unit/cookbook/syntax_check_spec.rb
parentd9208f7572e028244f3007ff8dbf0be7c9380593 (diff)
downloadchef-67a74e5029c5db0bffc63a4709ecf125353a247c.tar.gz
[CHEF-3715] rename ChecksumCache => Digester
Diffstat (limited to 'spec/unit/cookbook/syntax_check_spec.rb')
-rw-r--r--spec/unit/cookbook/syntax_check_spec.rb62
1 files changed, 0 insertions, 62 deletions
diff --git a/spec/unit/cookbook/syntax_check_spec.rb b/spec/unit/cookbook/syntax_check_spec.rb
index 4297751432..948b3c5a38 100644
--- a/spec/unit/cookbook/syntax_check_spec.rb
+++ b/spec/unit/cookbook/syntax_check_spec.rb
@@ -16,68 +16,6 @@
# limitations under the License.
#
-###################################################
-# OLD:
-###################################################
-# def test_ruby(cookbook_dir)
-# cache = Chef::ChecksumCache.instance
-# Dir[File.join(cookbook_dir, '**', '*.rb')].each do |ruby_file|
-# key = cache.generate_key(ruby_file, "chef-test")
-# fstat = File.stat(ruby_file)
-#
-# if cache.lookup_checksum(key, fstat)
-# Chef::Log.info("No change in checksum of #{ruby_file}")
-# else
-# Chef::Log.info("Testing #{ruby_file} for syntax errors...")
-# Chef::Mixin::Command.run_command(:command => "ruby -c #{ruby_file}", :output_on_failure => true)
-# cache.generate_checksum(key, ruby_file, fstat)
-# end
-# end
-# end
-#
-#def test_templates(cookbook_dir)
-# cache = Chef::ChecksumCache.instance
-# Dir[File.join(cookbook_dir, '**', '*.erb')].each do |erb_file|
-# key = cache.generate_key(erb_file, "chef-test")
-# fstat = File.stat(erb_file)
-#
-# if cache.lookup_checksum(key, fstat)
-# Chef::Log.info("No change in checksum of #{erb_file}")
-# else
-# Chef::Log.info("Testing template #{erb_file} for syntax errors...")
-# Chef::Mixin::Command.run_command(:command => "sh -c 'erubis -x #{erb_file} | ruby -c'", :output_on_failure => true)
-# cache.generate_checksum(key, erb_file, fstat)
-# end
-# end
-#end
-#
-
-###################################################
-# NEW:
-###################################################
-# def test_template_file(cookbook_dir, erb_file)
-# Chef::Log.debug("Testing template #{erb_file} for syntax errors...")
-# result = shell_out("sh -c 'erubis -x #{erb_file} | ruby -c'")
-# result.error!
-# rescue Mixlib::ShellOut::ShellCommandFailed
-# file_relative_path = erb_file[/^#{Regexp.escape(cookbook_dir+File::Separator)}(.*)/, 1]
-# Chef::Log.fatal("Erb template #{file_relative_path} has a syntax error:")
-# result.stderr.each_line { |l| Chef::Log.fatal(l.chomp) }
-# exit(1)
-# end
-#
-# def test_ruby_file(cookbook_dir, ruby_file)
-# Chef::Log.debug("Testing #{ruby_file} for syntax errors...")
-# result = shell_out("ruby -c #{ruby_file}")
-# result.error!
-# rescue Mixlib::ShellOut::ShellCommandFailed
-# file_relative_path = ruby_file[/^#{Regexp.escape(cookbook_dir+File::Separator)}(.*)/, 1]
-# Chef::Log.fatal("Cookbook file #{file_relative_path} has a syntax error:")
-# result.stderr.each_line { |l| Chef::Log.fatal(l.chomp) }
-# exit(1)
-# end
-#
-
require 'spec_helper'
require "chef/cookbook/syntax_check"