Issue #3138 has been updated by Andrew Parker. Target version deleted (2.7.x)
---------------------------------------- Feature #3138: Improve procedure for enabling rspec tests in modules https://projects.puppetlabs.com/issues/3138#change-80239 Author: Mike Pountney Status: Accepted Priority: Normal Assignee: Category: testing Target version: Affected Puppet version: 0.25.4 Keywords: rspec Branch: I'm logging this at the request of James Turnbull: I've recently started on my first puppet custom type/provider, and decided to try to do this a) in a module, and b) with rspec tests. I was able to get spec tests running, but with quite a bit of hackery, copying files from the main puppet repo: spec/spec_helper.rb test/lib test/lib/puppettest test/lib/puppettest/certificates.rb test/lib/puppettest/exetest.rb test/lib/puppettest/fakes.rb test/lib/puppettest/fileparsing.rb test/lib/puppettest/filetesting.rb test/lib/puppettest/parsertesting.rb test/lib/puppettest/railstesting.rb test/lib/puppettest/reporttesting.rb test/lib/puppettest/resourcetesting.rb test/lib/puppettest/runnable_test.rb test/lib/puppettest/servertest.rb test/lib/puppettest/support test/lib/puppettest/support/assertions.rb test/lib/puppettest/support/collection.rb test/lib/puppettest/support/helpers.rb test/lib/puppettest/support/resources.rb test/lib/puppettest/support/utils.rb test/lib/puppettest/support.rb test/lib/puppettest/testcase.rb test/lib/puppettest.rb Honestly, I haven't worked out which of these libs are totally required, but puppettest.rb is at a minimum. (puppettest/runnable_test.rb seems to be unrequired so far, except for being called in spec_helper.rb) Is there a way that this can be made easier? Developing types in modules seems to be a sensible way to go after all - it should allow folk on any client version to add a new type, rather than requiring they upgrade to puppet-latest. My vcsrepo module (based now on James' tutorial at http://www.kartar.net/2010/02/puppet-types-and-providers-are-easy/ btw) is located at: http://github.com/mikepea/puppet-git Naturally, i'm more than happy to help with this work, but my knowledge of the puppet codebase and Rspec framework is very limited. -- 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 puppet-bugs@googlegroups.com. To unsubscribe from this group, send email to puppet-bugs+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.