From 1bb3af1f037ecd75ad44328815e878b96c0c7dc9 Mon Sep 17 00:00:00 2001 From: Joshua Warchol Date: Fri, 13 Jan 2012 15:19:20 -0500 Subject: [PATCH 1/2] Added rake as a dev dep --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 32f2741..a77ec1b 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,7 @@ source :gemcutter gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git' group :development do + gem 'rake' gem 'rspec' gem 'em-http-request', :git => 'git://github.com/igrigorik/em-http-request' gem 'remcached' From 00b33b8aeb507cb16981c65f52c634596a3e23b9 Mon Sep 17 00:00:00 2001 From: Joshua Warchol Date: Fri, 13 Jan 2012 15:21:48 -0500 Subject: [PATCH 2/2] 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 # Fixed by using the right cleanup method. Does anyone know why the bad call to #delete didn't raise an error? --- spec/hiredis_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/hiredis_spec.rb b/spec/hiredis_spec.rb index 14deba3..e67ea83 100644 --- a/spec/hiredis_spec.rb +++ b/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