Guest User

Untitled

a guest
Jun 18th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. Spec::Runner.configure do |config|
  2.  
  3. # used to be :all when transactional fixtures are working
  4. config.before(:each) do
  5. DataMapper.auto_migrate!
  6. end
  7.  
  8. # needs to be commented currently with 0.10.0
  9. # config.before(:each) do
  10. # DataMapper.repository(:default) do |r|
  11. # transaction = DataMapper::Transaction.new(r)
  12. # transaction.begin
  13. # r.adapter.push_transaction(transaction)
  14. # end
  15. # end
  16. #
  17. # config.after(:each) do
  18. # DataMapper.repository(:default) do |r|
  19. # adapter = r.adapter
  20. # while adapter.current_transaction
  21. # adapter.current_transaction.rollback
  22. # adapter.pop_transaction
  23. # end
  24. # end
  25. # end
  26.  
  27. end
Add Comment
Please, Sign In to add comment