diff options
Diffstat (limited to 'test/language/snippets.rb')
-rwxr-xr-x | test/language/snippets.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/language/snippets.rb b/test/language/snippets.rb index 069f7aced..2a997c877 100755 --- a/test/language/snippets.rb +++ b/test/language/snippets.rb @@ -30,6 +30,13 @@ class TestSnippets < Test::Unit::TestCase end end + def assert_not_file(path, msg = nil) + if file = @file[path] + msg ||= "File %s exists!" % path + raise msg + end + end + def assert_mode_equal(mode, path) unless file = @catalog.resource(:file, path) raise "Could not find file %s" % path @@ -459,6 +466,15 @@ class TestSnippets < Test::Unit::TestCase "Did not make second file from array") end + def snippet_multipleclass + assert_file("/tmp/multipleclassone", "one") + assert_file("/tmp/multipleclasstwo", "two") + end + + def snippet_multilinecomments + assert_not_file("/tmp/multilinecomments","Did create a commented resource"); + end + # Iterate across each of the snippets and create a test. Dir.entries(snippetdir).sort.each { |file| next if file =~ /^\./ |