diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-15 19:12:18 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-15 19:12:18 +0000 |
commit | 8f14c3f3f30926869dac798b5a03351fca55b1df (patch) | |
tree | 97384eb836ec7b09d9840a6364387afbe2848525 | |
parent | def51752d340f5f1b25f8541df4022ba9dd35b8e (diff) | |
download | puppet-8f14c3f3f30926869dac798b5a03351fca55b1df.tar.gz |
failing more intelligently in init if ActiveRecord is missing
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1196 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r-- | lib/puppet/rails.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb index 0d01fbe07..016d7374a 100644 --- a/lib/puppet/rails.rb +++ b/lib/puppet/rails.rb @@ -54,6 +54,10 @@ module Puppet::Rails # Set up our database connection. It'd be nice to have a "use" system # that could make callbacks. def self.init + unless defined? ActiveRecord::Base + raise Puppet::DevError, "No activerecord, cannot init Puppet::Rails" + end + # This global init does not work for testing, because we remove # the state dir on every test. #unless (defined? @inited and @inited) or defined? Test::Unit::TestCase |