Guest User

Untitled

a guest
May 26th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. Rspec.configure do |config|
  2. config.mock_with :mocha
  3.  
  4. # Remove this line if you don't want Rspec's should and should_not
  5. # methods or matchers
  6. require 'rspec/expectations'
  7. config.include Rspec::Matchers
  8. config.include LLP::Test::ControllerHelper
  9.  
  10. config.after(:each) do
  11. repository(:default) do
  12. while repository.adapter.current_transaction
  13. repository.adapter.current_transaction.rollback
  14. repository.adapter.pop_transaction
  15. end
  16. end
  17. end
  18.  
  19. config.before(:each) do
  20. repository(:default) do
  21. transaction = DataMapper::Transaction.new(repository)
  22. transaction.begin
  23. repository.adapter.push_transaction(transaction)
  24. end
  25. end
  26. end
Add Comment
Please, Sign In to add comment