Sha256: 94a7330461b494da95eadfd58ffabdfb684f538348a08deb250866b8e3bcddbd
Contents?: true
Size: 538 Bytes
Versions: 32
Compression:
Stored size: 538 Bytes
Contents
module HelperMethods def set_fos_db(models) set_db(models,DB_FOS) end def set_demo_db(models) set_db(models,DB_DEMO) end def set_db(models,db) models.each{ |model| model.db=db } end # delete other rows, and create new one def add_test_table_data(hash) DB_DEMO[:test_table].delete DB_DEMO[:test_table] << hash end def stub_save_for_model(model) stub.instance_of(model)._refresh(anything) {} stub.instance_of(model)._update(anything) {} stub.instance_of(model)._insert {} end end
Version data entries
32 entries across 32 versions & 1 rubygems