diff options
author | Matt Robinson <matt@puppetlabs.com> | 2011-04-08 16:05:41 -0700 |
---|---|---|
committer | Matt Robinson <matt@puppetlabs.com> | 2011-04-11 15:40:13 -0700 |
commit | 23c9663d2142b9c674257fd47952d5e58c8ca7a7 (patch) | |
tree | 13be46964c4427806f65869ee5906689b6c36555 | |
parent | 4b73d41be6436e3eb92d86340aed08dbce1f63cf (diff) | |
download | puppet-23c9663d2142b9c674257fd47952d5e58c8ca7a7.tar.gz puppet-23c9663d2142b9c674257fd47952d5e58c8ca7a7.tar.xz puppet-23c9663d2142b9c674257fd47952d5e58c8ca7a7.zip |
maint: Fix sqlite3 require to really be optional
You need to specifically rescue LoadError if you want requires to be
optional.
Paired-with: Nick Lewis
-rw-r--r-- | spec/unit/indirector/facts/inventory_active_record_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/unit/indirector/facts/inventory_active_record_spec.rb b/spec/unit/indirector/facts/inventory_active_record_spec.rb index 538aa5f47..022150c76 100644 --- a/spec/unit/indirector/facts/inventory_active_record_spec.rb +++ b/spec/unit/indirector/facts/inventory_active_record_spec.rb @@ -1,7 +1,10 @@ #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../../spec_helper' -require 'sqlite3' rescue nil +begin + require 'sqlite3' +rescue LoadError +end require 'tempfile' require 'puppet/rails' |