Sha256: 2b47fbd75e53c0240abe3a394fc1c28565a873fcb4a7817a589e4cda659d5a45

Contents?: true

Size: 1016 Bytes

Versions: 12

Compression:

Stored size: 1016 Bytes

Contents

class ToolsModuleTest < Minitest::Test
  def self.test_order
    :sorted
  end

  def test_cache_A_all_operators
    ToolsFiles.remove_file '/home/francisco/2018/xykotools/tools/teste-persistent.cache'
    ToolsCache.create_cache_file 'tools', (File.dirname __dir__) + '/teste-persistent.cache', 60
    assert_equal ToolsCache.tools_list, {}
    ToolsCache.tools_set :k1, 100
    assert_equal ToolsCache.tools_list, k1: 100
    ToolsCache.tools_unset :k1
    assert_equal ToolsCache.tools_list, {}
    ToolsCache.tools_set :k2, i: 100, j: 200
    ToolsCache.tools_set :k2, l: 100, m: 200
    ToolsCache.tools_set :k3, []
    ToolsCache.tools_set :k3, [1, 2, 3]
    ToolsCache.tools_set :k3, [4, %w[a b]]
    assert_equal (ToolsCache.tools_get :k3), [1, 2, 3, 4, %w[a b]]
    assert_equal (ToolsCache.tools_get :k2), i: 100, j: 200, l: 100, m: 200
    ToolsCache.tools_clear
    assert_equal ToolsCache.tools_list, {}
    ToolsFiles.remove_file '/home/francisco/2018/xykotools/tools/teste-persistent.cache'
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tools-1.2.0 test/mini_cache.rb
tools-1.1.0 test/mini_cache.rb
tools-1.0.1 test/mini_cache.rb
tools-1.0.0 test/mini_cache.rb
tools-0.5.4 test/mini_cache.rb
tools-0.5.3 test/mini_cache.rb
tools-0.5.1 test/mini_cache.rb
tools-0.5.0 test/mini_cache.rb
tools-0.4.9 test/mini_cache.rb
tools-0.4.8 test/mini_cache.rb
tools-0.4.7 test/mini_cache.rb
tools-0.4.6 test/mini_cache.rb