spec/commands/getset_spec.rb in mock_redis-0.14.1 vs spec/commands/getset_spec.rb in mock_redis-0.15.0
- old
+ new
@@ -1,23 +1,23 @@
require 'spec_helper'
-describe "#getrange(key, value)" do
+describe '#getrange(key, value)' do
before do
@key = 'mock-redis-test:getset'
- @redises.set(@key, "oldvalue")
+ @redises.set(@key, 'oldvalue')
end
- it "returns the old value" do
- @redises.getset(@key, 'newvalue').should == "oldvalue"
+ it 'returns the old value' do
+ @redises.getset(@key, 'newvalue').should == 'oldvalue'
end
- it "sets the value to the new value" do
+ it 'sets the value to the new value' do
@redises.getset(@key, 'newvalue')
@redises.get(@key).should == 'newvalue'
end
- it "returns nil for nonexistent keys" do
+ it 'returns nil for nonexistent keys' do
@redises.getset('mock-redis-test:not-found', 1).should be_nil
end
- it_should_behave_like "a string-only command"
+ it_should_behave_like 'a string-only command'
end