Issue #6722 has been updated by Daniel Pittman. Status changed from Unreviewed to Available In Testing Branch
https://github.com/puppetlabs/puppet/commit/489942706726629fe0d477ebb2692c2b0b05c43e Now available in `next`; we might want to merge this to `2.6.next` as well, but waiting for user demand. ---------------------------------------- Feature #6722: It should be possible to run parser function rspec tests individually https://projects.puppetlabs.com/issues/6722 Author: Dan Bode Status: Available In Testing Branch Priority: Normal Assignee: Daniel Pittman Category: testing Target version: Affected Puppet version: Keywords: Branch: https://github.com/daniel-pittman/puppet/tree/feature/next/6722-it-should-be-possible-to-run-parser-function-rspec-tests-individually For all rspec tests for functions in Puppet (except extlookup) it is only possible to run the first test with rspec -l. All other tests will fail if run individually. for example, in defined_spec.rb <pre> 13 it "should exist" do 14 Puppet::Parser::Functions.function("defined").should == "function_defined" 15 end 16 17 it "should be true when the name is defined as a class" do 18 @scope.known_resource_types.add Puppet::Resource::Type.new(:hostclass, "yayness") 19 @scope.function_defined("yayness").should be_true 20 end </pre> <pre> :!rspec -l 13 defined_spec.rb Run filtered using {:line_number=>13} . Finished in 0.00415 seconds 1 example, 0 failures </pre> <pre> :!rspec -l 17 defined_spec.rb Run filtered using {:line_number=>17} F Failures: 1) the 'defined' function should be true when the name is defined as a class Failure/Error: @scope.function_defined("yayness").should be_true NoMethodError: undefined method `function_defined' for #<Puppet::Parser::Scope:0xb78bf210> # ./defined_spec.rb:19 Finished in 0.00278 seconds 1 example, 1 failure shell returned 1 </pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
