Created
July 5, 2011 19:12
-
-
Save lak/1065612 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
luke@syringe $ rspec spec/unit/parser/scope_spec.rb spec/unit/parser/functions/versioncmp_spec.rb | |
...............................................................................FFF | |
Failures: | |
1) the versioncmp function should raise a ParseError if there is less than 2 arguments | |
Failure/Error: lambda { @scope.function_versioncmp(["1.2"]) }.should raise_error(Puppet::ParseError) | |
expected Puppet::ParseError, got #<NoMethodError: undefined method `function_versioncmp' for #<Puppet::Parser::Scope:0x102008e50>> | |
# ./spec/unit/parser/functions/versioncmp_spec.rb:18 | |
2) the versioncmp function should raise a ParseError if there is more than 2 arguments | |
Failure/Error: lambda { @scope.function_versioncmp(["1.2", "2.4.5", "3.5.6"]) }.should raise_error(Puppet::ParseError) | |
expected Puppet::ParseError, got #<NoMethodError: undefined method `function_versioncmp' for #<Puppet::Parser::Scope:0x1020018a8>> | |
# ./spec/unit/parser/functions/versioncmp_spec.rb:22 | |
3) the versioncmp function should call Puppet::Util::Package.versioncmp (included in scope) | |
Failure/Error: @scope.function_versioncmp(["1.2", "1.3"]) | |
NoMethodError: | |
undefined method `function_versioncmp' for #<Puppet::Parser::Scope:0x101ffb3e0> | |
# ./spec/unit/parser/functions/versioncmp_spec.rb:28 | |
Finished in 0.27247 seconds | |
82 examples, 3 failures | |
[refactor/master/8232-array_indexers_on_scope ~/puppet] | |
luke@syringe $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
diff --git a/lib/puppet/parser/functions.rb b/lib/puppet/parser/functions.rb
index e19ac12..683450b 100644
--- a/lib/puppet/parser/functions.rb
+++ b/lib/puppet/parser/functions.rb
@@ -29,8 +29,9 @@ module Puppet::Parser::Functions
Environment = Puppet::Node::Environment
def self.environment_module(env = nil)
@modules.synchronize {
end