Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

::ActiveRecord::Base (needs the initial ::)

  • Loading branch information...
commit a503489b5c1af3de4cb975fbeb3860b4ce329dc6 1 parent 92539d2
David Chelimsky dchelimsky authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 lib/merb_cucumber/helpers/activerecord.rb
16 lib/merb_cucumber/helpers/activerecord.rb
View
@@ -8,21 +8,21 @@ module ClassMethods
def use_transactional_fixtures
# Let's set a transaction on the ActiveRecord connection when starting a new scenario
$main.Before do
- if ActiveRecord::Base.connection.respond_to?(:increment_open_transactions)
- ActiveRecord::Base.connection.increment_open_transactions
+ if ::ActiveRecord::Base.connection.respond_to?(:increment_open_transactions)
+ ::ActiveRecord::Base.connection.increment_open_transactions
else
- ActiveRecord::Base.send :increment_open_transactions
+ ::ActiveRecord::Base.send :increment_open_transactions
end
- ActiveRecord::Base.connection.begin_db_transaction
+ ::ActiveRecord::Base.connection.begin_db_transaction
end
# Going with a rollback after every step in the scenario is executed
$main.After do
- ActiveRecord::Base.connection.rollback_db_transaction
- if ActiveRecord::Base.connection.respond_to?(:decrement_open_transactions)
- ActiveRecord::Base.connection.decrement_open_transactions
+ ::ActiveRecord::Base.connection.rollback_db_transaction
+ if ::ActiveRecord::Base.connection.respond_to?(:decrement_open_transactions)
+ ::ActiveRecord::Base.connection.decrement_open_transactions
else
- ActiveRecord::Base.send :decrement_open_transactions
+ ::ActiveRecord::Base.send :decrement_open_transactions
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.