Skip to content

(Maint) Fix mis-use of rvalue functions as statements#91

Merged
jeffmccune merged 2 commits intopuppetlabs:2.1.xfrom
jeffmccune:fix/2.1.x/spec_failures
Aug 20, 2012
Merged

(Maint) Fix mis-use of rvalue functions as statements#91
jeffmccune merged 2 commits intopuppetlabs:2.1.xfrom
jeffmccune:fix/2.1.x/spec_failures

Conversation

@jeffmccune
Copy link
Copy Markdown
Contributor

Without this patch applied the spec tests are invalid because they call
rvalue functions as if they were statements. This is a problem because
Puppet 2.7.x currently throws an exception if a rvalue function is invoked
as if it were a statement function. This exception from Puppet is causing
tests to fail.

This patch fixes the problem by changing the tests to assign the return
value of the functions to a variable. This fixes the problem by invoking
the functions properly.

Paired-with: Andrew Parker andy@puppetlabs.com

Jeff McCune added 2 commits August 20, 2012 11:49
Without this patch we don't get an opinionated rspec behavior.  This
patch makes the behavior of `rake test` and `rspec spec/` opinionated
by including some default options.
Without this patch applied the spec tests are invalid because they call
rvalue functions as if they were statements.  This is a problem because
Puppet 2.7.x currently throws an exception if a rvalue function is
invoked as if it were a statement function.  This exception from Puppet
is causing tests to fail.

This patch fixes the problem by changing the tests to assign the return
value of the functions to a variable.  This fixes the problem by
invoking the functions properly.

Paired-with: Andrew Parker <andy@puppetlabs.com>
@jeffmccune jeffmccune merged commit 4492913 into puppetlabs:2.1.x Aug 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants