summaryrefslogtreecommitdiffstats
path: root/test/util/autoload.rb
diff options
context:
space:
mode:
authorJacob Helwig <jacob@puppetlabs.com>2011-06-17 11:23:21 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-06-17 11:32:29 -0700
commit92a8f4a1cbb4e11a9bacf571b4c9f3d8181392fb (patch)
treeb261a5bc488911859595ec1245dc175abc07d1be /test/util/autoload.rb
parent0b0a9be25f95f7dfd14bbcc9bf7c7f9b21531100 (diff)
downloadpuppet-92a8f4a1cbb4e11a9bacf571b4c9f3d8181392fb.tar.gz
puppet-92a8f4a1cbb4e11a9bacf571b4c9f3d8181392fb.tar.xz
puppet-92a8f4a1cbb4e11a9bacf571b4c9f3d8181392fb.zip
Remove order dependency from functions integration spec
The test in spec/integration/parser/functions_spec.rb would fail when the spec tests were run in the order (among other orderings): spec/unit/parser/functions/tag_spec.rb spec/unit/parser/templatewrapper_spec.rb spec/integration/parser/functions_spec.rb There are tests that would cause the "template" function to be loaded into the root environment. Puppet::Parser::Functions.function("template") would then detect its presence and P::P::F.rmfunction("template") would fail since #function(...) looks in more than just the current environment to see if a function is defined, while #rmfunction(...) only looks in the current environment to see if a function can be removed. In the test ordering specified earlier, tag_spec.rb would load the "template" function, and templatewrapper_spec.rb would create a current environment that would mask the root environment for #rmfunction(...), but not for #function(...) Since #rmfunction(...) only looks in the current environment, we should be using #functions.include?("template") since that matches the check that #rmfunction(...) itself uses. Paired-with: Nick Lewis <nick@puppetlabs.com>
Diffstat (limited to 'test/util/autoload.rb')
0 files changed, 0 insertions, 0 deletions