spec/commands/smembers_spec.rb in mock_redis-0.13.1 vs spec/commands/smembers_spec.rb in mock_redis-0.13.2
- old
+ new
@@ -12,7 +12,17 @@
@redises.sadd(@key, "World")
@redises.sadd(@key, "Test")
@redises.smembers(@key).should == %w[Test World Hello]
end
+ it 'returns unfrozen copies of the input' do
+ input = 'a string'
+ @redises.sadd(@key, input)
+ output = @redises.smembers(@key).first
+
+ expect(output).to eq input
+ expect(output).to_not equal input
+ expect(output).to_not be_frozen
+ end
+
it_should_behave_like "a set-only command"
end