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.50 spec/helper_methods.rb
fossil-0.5.49 spec/helper_methods.rb
fossil-0.5.48 spec/helper_methods.rb
fossil-0.5.47 spec/helper_methods.rb
fossil-0.5.46 spec/helper_methods.rb
fossil-0.5.45 spec/helper_methods.rb
fossil-0.5.44 spec/helper_methods.rb
fossil-0.5.43 spec/helper_methods.rb
fossil-0.5.42 spec/helper_methods.rb
fossil-0.5.41 spec/helper_methods.rb
fossil-0.5.40 spec/helper_methods.rb
fossil-0.5.39 spec/helper_methods.rb
fossil-0.5.38 spec/helper_methods.rb
fossil-0.5.37 spec/helper_methods.rb
fossil-0.5.36 spec/helper_methods.rb
fossil-0.5.35 spec/helper_methods.rb
fossil-0.5.34 spec/helper_methods.rb
fossil-0.5.33 spec/helper_methods.rb
fossil-0.5.32 spec/helper_methods.rb
fossil-0.5.31 spec/helper_methods.rb