On Thu, 2010-08-19 at 22:11 +1000, Daniel Pittman wrote: > This works around the interaction of Debian packaged librspec-ruby and gems. > Under Debian the library is available, but the gem support fails; this ignores > the gem failure and carries on anyway. > > Signed-off-by: Daniel Pittman <[email protected]> > > --- > spec/spec_helper.rb | 7 ++++++- > 1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb > index 539ae20..0030456 100644 > --- a/spec/spec_helper.rb > +++ b/spec/spec_helper.rb > @@ -21,7 +21,12 @@ end > require 'puppettest' > require 'puppettest/runnable_test' > require 'mocha' > -gem 'rspec', '>=1.2.9' > + > +begin > + gem 'rspec', '>=1.2.9' > +rescue Gem::LoadError
It might be too broad (but I really don't know as I didn't check). Wouldn't it also catch if I have version 1.2.8 installed? In which case we would have to throw the error to warn the user? -- Brice Figureau Follow the latest Puppet Community evolutions on www.planetpuppet.org! -- You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev?hl=en.
