spec/commands/sdiffstore_spec.rb in mock_redis-0.4.1 vs spec/commands/sdiffstore_spec.rb in mock_redis-0.5.0
- old
+ new
@@ -16,27 +16,27 @@
@redises.sdiffstore(@destination, @numbers, @evens).should == 5
end
it "stores the resulting set" do
@redises.sdiffstore(@destination, @numbers, @evens)
- @redises.smembers(@destination).should == %w[1 3 5 7 9]
+ @redises.smembers(@destination).should == %w[9 7 5 3 1]
end
it "does not store empty sets" do
@redises.sdiffstore(@destination, @numbers, @numbers).should == 0
@redises.get(@destination).should be_nil
end
it "treats missing keys as empty sets" do
@redises.sdiffstore(@destination, @evens, 'mock-redis-test:nonesuch')
- @redises.smembers(@destination).should == %w[10 2 4 6 8]
+ @redises.smembers(@destination).should == %w[10 8 6 4 2]
end
it "removes existing elements in destination" do
@redises.sadd(@destination, 42)
@redises.sdiffstore(@destination, @primes)
- @redises.smembers(@destination).should == %w[2 3 5 7]
+ @redises.smembers(@destination).should == %w[7 5 3 2]
end
it "raises an error if given 0 sets" do
lambda do
@redises.sdiffstore(@destination)