Module: ReversibleData::ShouldaMacros

Defined in:
lib/reversible_data/shoulda_macros.rb

Instance Method Summary collapse

Instance Method Details

#with_tables(*args, &blk) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/reversible_data/shoulda_macros.rb', line 4

def with_tables(*args, &blk)
  table_manager = ReversibleData.manager_for(*args)
  context '' do
    setup { table_manager.up! }
    context('', &blk)
    teardown { table_manager.down! }
  end
end