spec/array_spec.rb in rico-0.2.0 vs spec/array_spec.rb in rico-0.3.0
- old
+ new
@@ -11,9 +11,16 @@
a.add(1, 2, 3)
b = Rico::Array.new RiakHelpers.bucket, "add_writes_values"
b.members.should eql [1, 2, 3]
end
+ it "retains a single value as an array" do
+ a = Rico::Array.new RiakHelpers.bucket, "add_flattens_values"
+ a.add([1, 2, 3])
+ b = Rico::Array.new RiakHelpers.bucket, "add_flattens_values"
+ b.members.should eql [[1, 2, 3]]
+ end
+
it "allows duplicate values" do
a = Rico::Array.new RiakHelpers.bucket, "add_allows_duplicates"
a.add(1, 2, 3)
a.add(2, 3, 4)
b = Rico::Array.new RiakHelpers.bucket, "add_allows_duplicates"