test/lint/sets.rb in redis-3.0.5 vs test/lint/sets.rb in redis-3.0.6

- old
+ new

@@ -9,16 +9,16 @@ assert_equal ["s1", "s2"], r.smembers("foo").sort end def test_variadic_sadd - return if version < "2.3.9" # 2.4-rc6 + target_version "2.3.9" do # 2.4-rc6 + assert_equal 2, r.sadd("foo", ["s1", "s2"]) + assert_equal 1, r.sadd("foo", ["s1", "s2", "s3"]) - assert_equal 2, r.sadd("foo", ["s1", "s2"]) - assert_equal 1, r.sadd("foo", ["s1", "s2", "s3"]) - - assert_equal ["s1", "s2", "s3"], r.smembers("foo").sort + assert_equal ["s1", "s2", "s3"], r.smembers("foo").sort + end end def test_srem r.sadd("foo", "s1") r.sadd("foo", "s2") @@ -28,20 +28,20 @@ assert_equal ["s2"], r.smembers("foo") end def test_variadic_srem - return if version < "2.3.9" # 2.4-rc6 + target_version "2.3.9" do # 2.4-rc6 + r.sadd("foo", "s1") + r.sadd("foo", "s2") + r.sadd("foo", "s3") - r.sadd("foo", "s1") - r.sadd("foo", "s2") - r.sadd("foo", "s3") + assert_equal 1, r.srem("foo", ["s1", "aaa"]) + assert_equal 0, r.srem("foo", ["bbb", "ccc" "ddd"]) + assert_equal 1, r.srem("foo", ["eee", "s3"]) - assert_equal 1, r.srem("foo", ["s1", "aaa"]) - assert_equal 0, r.srem("foo", ["bbb", "ccc" "ddd"]) - assert_equal 1, r.srem("foo", ["eee", "s3"]) - - assert_equal ["s2"], r.smembers("foo") + assert_equal ["s2"], r.smembers("foo") + end end def test_spop r.sadd "foo", "s1" r.sadd "foo", "s2"