summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/functions/include_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* maint: clean up the spec test headers in bulk.Daniel Pittman2011-04-131-2/+1
| | | | | | | We now use a shebang of: #!/usr/bin/env rspec This enables the direct execution of spec tests again, which was lost earlier during the transition to more directly using the rspec2 runtime environment.
* maint: just require 'spec_helper', thanks rspec2Daniel Pittman2011-04-081-1/+1
| | | | | | | | | | | rspec2 automatically sets a bunch of load-path stuff we were by hand, so we can just stop. As a side-effect we can now avoid a whole pile of stupid things to try and include the spec_helper.rb file... ...and then we can stop protecting spec_helper from evaluating twice, since we now require it with a consistent name. Yay. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
* (#6722) load all functions before testing...Daniel Pittman2011-03-161-0/+3
| | | | | | | | | | | | | | We historically had a state-dependency across tests in the parser function support area; the first test caused the function to be loaded, and other tests would then fail as a consequence of that. We now autoload all functions at the top of each test suite, allowing us to correctly and sensibly test on them as we should. This theoretically prevents us from testing the autoloader implicitly in these tests, but that should be tested independently. Paired-With: Nick Lewis <nick@puppetlabs.com>
* maint: Use expand_path when requiring spec_helper or puppettestMatt Robinson2010-12-061-1/+1
| | | | | | | | | Doing a require to a relative path can cause files to be required more than once when they're required from different relative paths. If you expand the path fully, this won't happen. Ruby 1.9 also requires that you use expand_path when doing these requires. Paired-with: Jesse Wolfe
* [#4242] Fixed (removed) a broken unit testNick Lewis2010-08-031-22/+0
| | | | | This test ran into a mocha bug, and was stubbing too much anyway. It's being moved to an acceptance test.
* Temporary tweak to tests for #4242Markus Roberts2010-07-251-0/+5
| | | | | | | The tests introduced with the fix for #4242 have isolation issues apparently due to the creation of a stage resource which is global and persistent. This patch stubs the creation, marks the one test which is thus invalidated pending, and adds comments noting the problem.
* [#4242] Fixed recursion due to parents including their childrenNick Lewis2010-07-251-0/+50
Resources mark themselves as evaluated to prevent being evaluated again. Unfortunately, they were not marking themselves until after they had finished being completely evaluated. Thus, there was nothing actually stopping recursive evaluations. This patch just makes resources mark themselves as evaluated when they start evaluating, and adds tests. The original setting of evaluated was done in an ensure block, so this doesn't change the behavior of a resource which fails to evaluate. The only places evaluated? is checked aren't affected by this change, as they wouldn't want to evaluate it when it's already being evaluated anyway.