spec/support/sets.rb in rediska-0.0.4 vs spec/support/sets.rb in rediska-0.0.5
- old
+ new
@@ -42,9 +42,15 @@
subject.sadd('key3', 'e')
subject.sdiff('key1', 'key2', 'key3').should =~ ['b', 'd']
end
+ it 'should subtract from a nonexistent set' do
+ subject.sadd('key2', 'a')
+ subject.sadd('key2', 'b')
+ subject.sdiff('key1', 'key2').should be_empty
+ end
+
it 'should subtract multiple sets and store the resulting set in a key' do
subject.sadd('key1', 'a')
subject.sadd('key1', 'b')
subject.sadd('key1', 'c')
subject.sadd('key1', 'd')