Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed cleanup method call in hiredis spec

The previous call to #delete was actually raising an error, because the
method name is #del. Unless you had previously set the "key" key, the
test would have passed. Setting it to a string would expose the
following error:

     NoMethodError:
            undefined method `to_i' for #<RuntimeError:0x007fd4e1842660>

Fixed by using the right cleanup method. Does anyone know why the bad
call to #delete didn't raise an error?
  • Loading branch information...
commit 00b33b8aeb507cb16981c65f52c634596a3e23b9 1 parent 1bb3af1
@jwarchol jwarchol authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  spec/hiredis_spec.rb
View
2  spec/hiredis_spec.rb
@@ -49,7 +49,7 @@
it "should incr/decr key synchronously" do
EventMachine.synchrony do
redis = EM::Hiredis::Client.connect
- redis.delete('key')
+ redis.del('key')
redis.incr('key')
redis.get('key').to_i.should == 1
Please sign in to comment.
Something went wrong with that request. Please try again.