Module Mack::Testing::DataMapperHelpers
In: lib/test_extensions.rb

Methods

Public Instance methods

[Source]

    # File lib/test_extensions.rb, line 30
30:           def rollback_transaction
31:             begin
32:               Mack::Testing::DmTestTransactionWrapper.transaction do
33:               # DataMapper::Transaction.new.commit do
34:                 yield if block_given?
35:                 raise "Rollback!"
36:               end
37:             rescue => ex
38:               # we need to do this so we can throw up actual errors!
39:               unless ex.to_s == "Rollback!"
40:                 raise ex
41:               end
42:             end
43:           end

[Validate]