Sha256: 8539b00a5d2e48c976db45aa44533d44a6a8d9d704745259942b5456fd616c1c
Contents?: true
Size: 803 Bytes
Versions: 3
Compression:
Stored size: 803 Bytes
Contents
# # testing ruote # # Sun Mar 14 21:25:52 JST 2010 # require File.join(File.dirname(__FILE__), '..', 'test_helper.rb') require 'ruote' require 'ruote/storage/composite_storage' class UtCompositeStorageTest < Test::Unit::TestCase def test_initial msgs = Ruote::HashStorage.new({}) default = Ruote::HashStorage.new({}) cs = Ruote::CompositeStorage.new(default, 'msgs' => msgs) cs.put('action' => 'terminate', 'type' => 'msgs', 'id' => 'xxx') cs.put_msg('terminate', 'type' => 'msgs') cs.put_schedule('at', {}, Time.now + 10, 'action' => 'reply') assert_equal 0, default.h['msgs'].size assert_equal 1, default.h['schedules'].size assert_equal 2, cs.get_msgs.size assert_equal 2, msgs.get_msgs.size assert_equal 0, msgs.h['schedules'].size end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruote-2.1.10 | test/unit/ut_20_composite_storage.rb |
ruote-2.1.9 | test/unit/ut_20_composite_storage.rb |
ruote-2.1.8 | test/unit/ut_20_composite_storage.rb |