Displaying 2 results from an estimated 2 matches for "rollback_transaction".
2008 Mar 14
0
Adding before / after blocks to every spec
...nctionality similar to rails transactional fixtures.
Here is the module:
module Merb
module Test
module TransactionalSpecs
def begin_transaction
ActiveRecord::Base.send :increment_open_transactions
ActiveRecord::Base.connection.begin_db_transaction
end
def rollback_transaction
if Thread.current[''open_transactions''] != 0
ActiveRecord::Base.connection.rollback_db_transaction
Thread.current[''open_transactions''] = 0
end
end
def self.included(base)
base.before(:each) { begin_transacti...
2012 Oct 18
3
Issues upgrading RSpec
...res.rb:191:in
`execute''
#
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286 at rails/gems/sequel-3.35.0/lib/sequel/adapters/postgres.rb:532:in
`log_connection_execute''
#
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286 at rails/gems/sequel-3.35.0/lib/sequel/database/query.rb:547:in
`rollback_transaction''
#
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286 at rails/gems/sequel-3.35.0/lib/sequel/database/query.rb:296:in
`rescue in _transaction''
#
/home/rodrigo/.rvm/gems/ruby-1.9.3-p286 at rails/gems/sequel-3.35.0/lib/sequel/database/query.rb:309:in
`_transaction''...