test/factbase/test_accum.rb in factbase-0.3.0 vs test/factbase/test_accum.rb in factbase-0.4.0
- old
+ new
@@ -65,6 +65,15 @@
def test_empties
f = Factbase::Fact.new(Mutex.new, {})
a = Factbase::Accum.new(f, {}, false)
assert(a['foo'].nil?)
end
+
+ def test_prints_to_string
+ map = {}
+ f = Factbase::Fact.new(Mutex.new, map)
+ props = {}
+ a = Factbase::Accum.new(f, props, true)
+ a.foo = 42
+ assert_equal('[ foo: [42] ]', f.to_s)
+ end
end