summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-08-26 22:40:26 -0700
committerLuke Kanies <luke@madstop.com>2008-08-26 22:40:26 -0700
commit5b9dd01326a61b9ae89ae978e29a8170f76deb5e (patch)
tree59b84d32ae10cccf8dac9f7c0434b58704629615 /test
parent7034882fdfbd3846e77c518e43bdea1f9154e250 (diff)
parentb50e718490abe41f09e16e1edc0d8de93aac8bfe (diff)
downloadpuppet-5b9dd01326a61b9ae89ae978e29a8170f76deb5e.tar.gz
puppet-5b9dd01326a61b9ae89ae978e29a8170f76deb5e.tar.xz
puppet-5b9dd01326a61b9ae89ae978e29a8170f76deb5e.zip
Merge commit 'turnbull/0.24.x'
Diffstat (limited to 'test')
-rwxr-xr-xtest/language/parser.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/language/parser.rb b/test/language/parser.rb
index effb2d40c..b1a0de3cf 100755
--- a/test/language/parser.rb
+++ b/test/language/parser.rb
@@ -1197,5 +1197,13 @@ file { "/tmp/yayness":
parser.import("test")
end
end
+
+ def test_watch_file_only_once
+ FileTest.stubs(:exists?).returns(true)
+ parser = mkparser
+ parser.watch_file("doh")
+ parser.watch_file("doh")
+ assert_equal(1, parser.files.select { |name, file| file.file == "doh" }.length, "Length of watched 'doh' files was not 1")
+ end
end