spec/map_spec.rb in rico-0.4.0 vs spec/map_spec.rb in rico-0.5.0
- old
+ new
@@ -83,9 +83,18 @@
b = Rico::Map.new RiakHelpers.bucket, "map_remove_order_dedupe"
b.members.should eql({"a" => 1, "d" => 4})
end
end
+ describe "#members" do
+ it "asserts value type as hash" do
+ a = Rico::Array.new RiakHelpers.bucket, "map_members_assert_type"
+ a.add [1,2,3]
+ b = Rico::Map.new RiakHelpers.bucket, "map_members_assert_type"
+ lambda { b.members }.should raise_error(TypeError)
+ end
+ end
+
describe "#length" do
it "returns zero for an empty list" do
a = Rico::Map.new RiakHelpers.bucket, "map_length_empty"
a.length.should eql 0
end