summaryrefslogtreecommitdiff
path: root/spec/lib/puppet_spec/database.rb
diff options
context:
space:
mode:
authorDavid Schmitt <david.schmitt@puppetlabs.com>2015-06-01 12:21:59 +0100
committerDavid Schmitt <david.schmitt@puppetlabs.com>2015-06-01 18:02:22 +0100
commit18d4c21418e8d188ae659a92ff3a8df04d711f6a (patch)
treef044a3b9c65db499ae279a08328c18200201d094 /spec/lib/puppet_spec/database.rb
parentf3e79ddcd56a221c7799b35efde7e9803a5c7923 (diff)
Remove unused puppet_spec code
This is copied and changed code from an older version of puppet's internal test setup code. It does not work with puppet4.
Diffstat (limited to 'spec/lib/puppet_spec/database.rb')
-rwxr-xr-xspec/lib/puppet_spec/database.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/spec/lib/puppet_spec/database.rb b/spec/lib/puppet_spec/database.rb
deleted file mode 100755
index f5c2341..0000000
--- a/spec/lib/puppet_spec/database.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /usr/bin/env ruby -S rspec
-# This just makes some nice things available at global scope, and for setup of
-# tests to use a real fake database, rather than a fake stubs-that-don't-work
-# version of the same. Fun times.
-def sqlite?
- if $sqlite.nil?
- begin
- require 'sqlite3'
- $sqlite = true
- rescue LoadError
- $sqlite = false
- end
- end
- $sqlite
-end
-
-def can_use_scratch_database?
- sqlite? and Puppet.features.rails?
-end
-
-
-# This is expected to be called in your `before :each` block, and will get you
-# ready to roll with a serious database and all. Cleanup is handled
-# automatically for you. Nothing to do there.
-def setup_scratch_database
- Puppet[:dbadapter] = 'sqlite3'
- Puppet[:dblocation] = ':memory:'
- Puppet[:railslog] = PuppetSpec::Files.tmpfile('storeconfigs.log')
- Puppet::Rails.init
-end