diff --git a/spec/unit/indirector/facts/inventory_active_record_spec.rb b/spec/unit/indirector/facts/inventory_active_record_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/indirector/facts/inventory_active_record_spec.rb
+++ b/spec/unit/indirector/facts/inventory_active_record_spec.rb
@@ -32,6 +32,7 @@ describe "Puppet::Node::Facts::InventoryActiveRecord", :if => (Puppet.features.r
 
   after :each do
     Puppet::Rails.teardown
+    ActiveRecord::Base.remove_connection
   end
 
   describe "#save" do
maint: Fix sporadic sqlite error

ActiveRecord::StatementInvalid: SQLite3::IOException: disk I/O error

This happened if you ran these tests in the following order since Rails
wasn't disconnecting between tests.

rspec spec/unit/indirector/facts/inventory_active_record_spec.rb
spec/unit/indirector/node/active_record_spec.rb