Closed jcredding closed 10 years ago
This would work like Rails' around callbacks. I believe they rely on the callback yielding, which triggers. This would work something like:
class DbTests < Assert::Context around_test do ActiveRecord::Base.transaction do yield raise ActiveRecord::Rollback end end end
As the example shows, this could be useful with ActiveRecord transactions.
This would work like Rails' around callbacks. I believe they rely on the callback yielding, which triggers. This would work something like:
As the example shows, this could be useful with ActiveRecord transactions.