summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-04-08 16:05:41 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-04-11 15:40:13 -0700
commit23c9663d2142b9c674257fd47952d5e58c8ca7a7 (patch)
tree13be46964c4427806f65869ee5906689b6c36555
parent4b73d41be6436e3eb92d86340aed08dbce1f63cf (diff)
downloadpuppet-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.rb5
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'