aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-06-23 01:58:41 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-06-23 01:58:41 +0000
commit048dcf31c9215d4d48994e74631074a7399f5012 (patch)
tree78b5fe621c7350f8eeeae710c3dc73d5c7c3d8a9 /activerecord/test
parentc627590fd405bab67fce498cd2b6a781f99f261b (diff)
downloadrails-048dcf31c9215d4d48994e74631074a7399f5012.tar.gz
rails-048dcf31c9215d4d48994e74631074a7399f5012.tar.bz2
rails-048dcf31c9215d4d48994e74631074a7399f5012.zip
Mock the beginning of the transaction also. References #8642.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/transactions_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/transactions_test.rb b/activerecord/test/transactions_test.rb
index b253943eaa..a31d993dbb 100644
--- a/activerecord/test/transactions_test.rb
+++ b/activerecord/test/transactions_test.rb
@@ -167,6 +167,7 @@ class TransactionTest < Test::Unit::TestCase
uses_mocha 'mocking connection.commit_db_transaction' do
def test_rollback_when_commit_raises
+ Topic.connection.expects(:begin_db_transaction)
Topic.connection.expects(:commit_db_transaction).raises('OH NOES')
Topic.connection.expects(:rollback_db_transaction)