Quick update... Many thanks to @superseb for working up a PR[1] that fixes the expect errors. Trick was to use 'subject' within the expect, rather than a resource title...
@superseb also highlighted an old Puppet bug[2] which I've migrated across to Jira[3] for review/decision. However as per the notes on Redmine, I should be able to work around said bug by using a case statement rather then the tenary operator... Onwards and upwards. Cheers Gav [1] https://github.com/fatmcgav/puppet-glassfish/pull/8 [2] http://projects.puppetlabs.com/issues/4598 [3] https://tickets.puppetlabs.com/browse/PUP-1457 On 16 Jan 2014 17:27, "Gavin Williams" <[email protected]> wrote: > Afternoon all, > > I'm trying to add some rspec-puppet testing to my Glassfish module[1], in > preparation for releasing it to the forge. > > I've got some stuff working fine, however I'm trying to test expected > failure scenarios without much luck. > > Travis CI[2] highlights the issues I'm seeing. > An example error message is: > >> Failure/Error: expect { >> >> expected Puppet::Error with message matching /OSFamily Suse not >> supported/ but nothing was raised >> > This is as a result of a test[3] which is testing some validation logic in > my create_service[4] defined type. > > Any pointers on where I could be going wrong? > > Thanks in advance for any responses. > > Regards > Gavin > > [1] https://github.com/fatmcgav/puppet-glassfish > [2] https://travis-ci.org/fatmcgav/puppet-glassfish/jobs/17072897# > [3] > https://github.com/fatmcgav/puppet-glassfish/blob/master/spec/defines/create_service_spec.rb#L127-149 > [4] > https://github.com/fatmcgav/puppet-glassfish/blob/master/manifests/create_service.pp#L14-19 > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Puppet Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/puppet-users/Ek0ckKfPGYw/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/f04c1f56-60c0-4fa9-be03-f5fbe1129ce5%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAGJCw3j1fKUp1AajMoR6H5yH18zGBxD%3DzAwd%2B2X7%2Bjbv8p_afw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
