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

Version Path
fossil-0.5.30 spec/helper_methods.rb
fossil-0.5.29 spec/helper_methods.rb
fossil-0.5.28 spec/helper_methods.rb
fossil-0.5.27 spec/helper_methods.rb
fossil-0.5.26 spec/helper_methods.rb
fossil-0.5.25 spec/helper_methods.rb
fossil-0.5.24 spec/helper_methods.rb
fossil-0.5.23 spec/helper_methods.rb
fossil-0.5.22 spec/helper_methods.rb
fossil-0.5.21 spec/helper_methods.rb
fossil-0.5.20 spec/helper_methods.rb
fossil-0.5.19 spec/helper_methods.rb