diff options
author | Luke Kanies <luke@puppetlabs.com> | 2011-07-15 11:54:33 -0700 |
---|---|---|
committer | Luke Kanies <luke@puppetlabs.com> | 2011-07-15 11:54:33 -0700 |
commit | d69bf48ecae71ff01679bb38cdeebc8f4a8b8b15 (patch) | |
tree | 6f6b25251f0a581c878b833a90e5b3bab0ac5d11 /spec/unit/parser/functions_spec.rb | |
parent | 4ad404ee7e7244d94ff4d87effc1a041d65b3f73 (diff) | |
parent | bdc0f8716ae8ccb2b2657dfab591afe9589d8902 (diff) | |
download | puppet-d69bf48ecae71ff01679bb38cdeebc8f4a8b8b15.tar.gz puppet-d69bf48ecae71ff01679bb38cdeebc8f4a8b8b15.tar.xz puppet-d69bf48ecae71ff01679bb38cdeebc8f4a8b8b15.zip |
Merge branch 'refactor/master/8232-array_indexers_on_scope'
Diffstat (limited to 'spec/unit/parser/functions_spec.rb')
-rwxr-xr-x | spec/unit/parser/functions_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/parser/functions_spec.rb b/spec/unit/parser/functions_spec.rb index 8240a184c..7eb6f299b 100755 --- a/spec/unit/parser/functions_spec.rb +++ b/spec/unit/parser/functions_spec.rb @@ -20,13 +20,17 @@ describe Puppet::Parser::Functions do end it "should have a method for returning an environment-specific module" do - Puppet::Parser::Functions.environment_module("myenv").should be_instance_of(Module) + Puppet::Parser::Functions.environment_module(Puppet::Node::Environment.new("myenv")).should be_instance_of(Module) end it "should use the current default environment if no environment is provided" do Puppet::Parser::Functions.environment_module.should be_instance_of(Module) end + it "should be able to retrieve environment modules asked for by name rather than instance" do + Puppet::Parser::Functions.environment_module(Puppet::Node::Environment.new("myenv")).should equal(Puppet::Parser::Functions.environment_module("myenv")) + end + describe "when calling newfunction" do before do @module = Module.new |