Created
March 23, 2010 05:27
-
-
Save pathsny/340862 to your computer and use it in GitHub Desktop.
This file contains 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
describe "payment" do | |
prepend_before {@bypass_transactions = true} | |
it 'should hah' do | |
end | |
Spec::Runner.configure do |config| | |
config.before(:suite) do | |
DataMapper.auto_migrate! | |
end | |
config.after(:each) do | |
repository(:default) do | |
while repository.adapter.current_transaction | |
repository.adapter.current_transaction.rollback | |
repository.adapter.pop_transaction | |
end | |
end | |
end | |
config.before(:each) do | |
puts @bypass_transactions | |
repository(:default) do | |
transaction = DataMapper::Transaction.new(repository) | |
transaction.begin | |
repository.adapter.push_transaction(transaction) | |
end | |
Mocha::Configuration.prevent(:stubbing_non_existent_method) | |
end | |
config.mock_with :mocha | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment