Sha256: 9c53181610c3c124bf3bee4fd1982198644b77e7e45c1952adba129eac3cecbf
Contents?: true
Size: 426 Bytes
Versions: 6
Compression:
Stored size: 426 Bytes
Contents
require 'helper' test_case CRUDHash do class_method :create do test do h = CRUDHash.create(:a=>1,:b=>2) h.assert == {:a=>1,:b=>2} end end class_method :auto do test 'without a block' do h = CRUDHash.auto h[:a].assert == {} end test 'with a block' do h = CRUDHash.auto{ [] } h[:a].assert == [] end end end # # OT: Why not make `:a=>1` a Pair object? #
Version data entries
6 entries across 5 versions & 2 rubygems