Created
          May 10, 2011 16:37 
        
      - 
      
- 
        Save probablykabari/964844 to your computer and use it in GitHub Desktop. 
    datamapper rspec transaction
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | config.before(:each) do | |
| repository(:default) do | |
| transaction = DataMapper::Transaction.new(repository) | |
| transaction.begin | |
| repository.adapter.push_transaction(transaction) | |
| end | |
| end | |
| config.after(:each) do | |
| repository(:default).adapter.pop_transaction.rollback | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
worked great, thanks!