summaryrefslogtreecommitdiffstats
path: root/spec/unit/rails.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@reductivelabs.com>2009-12-21 16:23:44 -0800
committerLuke Kanies <luke@reductivelabs.com>2009-12-21 16:23:44 -0800
commit740fd6b301af89ab3aad89bca183ad1fcdc24ac4 (patch)
treef34617a229509c373d28d67abb453e7ae2136c39 /spec/unit/rails.rb
parent8971d8beae2c409f9052f27c3f80ad3bdfff4de2 (diff)
parent4a06379f8770c164e42bcc410d874076c6e95f24 (diff)
downloadpuppet-740fd6b301af89ab3aad89bca183ad1fcdc24ac4.tar.gz
puppet-740fd6b301af89ab3aad89bca183ad1fcdc24ac4.tar.xz
puppet-740fd6b301af89ab3aad89bca183ad1fcdc24ac4.zip
Merge branch '0.25.x'
Conflicts: lib/puppet/agent.rb lib/puppet/application/puppetd.rb lib/puppet/parser/ast/leaf.rb lib/puppet/util/rdoc/parser.rb
Diffstat (limited to 'spec/unit/rails.rb')
-rwxr-xr-xspec/unit/rails.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/rails.rb b/spec/unit/rails.rb
index 8ecd77a49..da6db1548 100755
--- a/spec/unit/rails.rb
+++ b/spec/unit/rails.rb
@@ -39,6 +39,7 @@ describe Puppet::Rails, "when initializing any connection" do
ActiveRecord::Base.stubs(:logger).returns(logger)
logger.expects(:level=).with(Logger::DEBUG)
+ ActiveRecord::Base.stubs(:allow_concurrency=)
ActiveRecord::Base.stubs(:verify_active_connections!)
ActiveRecord::Base.stubs(:establish_connection)
Puppet::Rails.stubs(:database_arguments)
@@ -46,6 +47,16 @@ describe Puppet::Rails, "when initializing any connection" do
Puppet::Rails.connect
end
+ describe "on ActiveRecord 2.1.x" do
+ confine "ActiveRecord 2.1.x" => (::ActiveRecord::VERSION::MAJOR == 2 and ::ActiveRecord::VERSION::MINOR <= 1)
+
+ it "should set ActiveRecord::Base.allow_concurrency" do
+ ActiveRecord::Base.expects(:allow_concurrency=).with(true)
+
+ Puppet::Rails.connect
+ end
+ end
+
it "should call ActiveRecord::Base.verify_active_connections!" do
ActiveRecord::Base.expects(:verify_active_connections!)