Sha256: 53fad6fa2f9eb15bf9159120fc073e752bb21836149519bf9fef5689ce75c821

Contents?: true

Size: 1.27 KB

Versions: 25

Compression:

Stored size: 1.27 KB

Contents

require 'helper'

require 'util/mongo_persisted_collection'
require 'util/json_file_persisted_collection'
require 'util/mongo_persisted_hash'
require 'util/json_file_persisted_hash'


class TestNutellaNetApp < MiniTest::Test

  def test_mongo_persisted_collection
    # pa = MongoPersistedCollection.new 'ltg.evl.uic.edu', 'nutella_test', 'test_collection'
    # pa.push( {an: 'object'} )
    # pa.push( {another: 'object'} )
    # pa.push( {idx_2: 'object'} )
    # pa.push( {idx_3: 'object'} )
    # pa.push( {idx_4: 'object'} )
    # p pa.replace( {ciccio: 'pasticcio'}, {ciccio: 'pasticcio'} )
    # p pa.length
    # p pa.to_a
  end


  def test_json_file_persisted_collection
    # pc = JSONFilePersistedCollection.new 'test.json'
    # # pc.push({an: 'object'}).push({another: 'object'})
    # p pc.length
    # p pc.to_a
    # p pc.replace({'an' => 'object'}, {'with_another' => 'object'})
  end


  def test_json_file_persisted_hash
    # ph = JSONFilePersistedHash.new 'test.json'
    # p ph['test']
    # p ph['test'] = 'yes'
    # p ph.delete_key_value? 'test'
    # p ph.add_key_value? 'test', 'pippo'
  end


  def test_mongo_persisted_hash
    # ph = MongoPersistedHash.new 'ltg.evl.uic.edu', 'nutella_test', 'hash_test', 'my_hash'
    # ph['ciao'] = 'bello'
    # p ph.to_h
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
nutella_lib-0.4.27 test/test_peristence.rb
nutella_lib-0.4.26 test/test_peristence.rb
nutella_lib-0.4.25 test/test_peristence.rb
nutella_lib-0.4.24 test/test_peristence.rb
nutella_lib-0.4.23 test/test_peristence.rb
nutella_lib-0.4.22 test/test_peristence.rb
nutella_lib-0.4.21 test/test_peristence.rb
nutella_lib-0.4.20 test/test_peristence.rb
nutella_lib-0.4.19 test/test_peristence.rb
nutella_lib-0.4.18 test/test_peristence.rb
nutella_lib-0.4.17 test/test_peristence.rb
nutella_lib-0.4.16 test/test_peristence.rb
nutella_lib-0.4.15 test/test_peristence.rb
nutella_lib-0.4.14 test/test_peristence.rb
nutella_lib-0.4.13 test/test_peristence.rb
nutella_lib-0.4.12 test/test_peristence.rb
nutella_lib-0.4.11 test/test_peristence.rb
nutella_lib-0.4.10 test/test_peristence.rb
nutella_lib-0.4.9 test/test_peristence.rb
nutella_lib-0.4.8 test/test_peristence.rb