Top Level Namespace
Defined Under Namespace
Modules: ActiveModelSerializersHelper, Barite, Concern Classes: ExceptionsApp
Instance Method Summary collapse
Instance Method Details
#create_mock_table(name, &block) ⇒ Object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/concern/templates/mock_table_helper.rb', line 1 def create_mock_table(name, &block) raise "no block given." unless block_given? before(:all) do m = ActiveRecord::Migration.new m.verbose = false m.create_table(name, &block) end after(:all) do m = ActiveRecord::Migration.new m.verbose = false m.drop_table(name) end end |