Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Failing zrangebyscore #16

Closed
wants to merge 4 commits into from

2 participants

@gerhard

I have double-checked, the same code works fine with the plain, synchronous redis gem.

@mloughran mloughran closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 15, 2012
  1. @gerhard

    Because you do want a gemset

    gerhard authored
  2. @gerhard
  3. @gerhard

    This explains how to pass options for commands that support them

    gerhard authored
    Too bad CommandOptions from Redis wasn't in a separate file,
    so that you could just include it.
  4. @gerhard

    No longer failing

    gerhard authored
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 0 deletions.
  1. +1 −0  .rvmrc
  2. +13 −0 spec/redis_commands_spec.rb
View
1  .rvmrc
@@ -0,0 +1 @@
+rvm use --create 1.9.2@em-hiredis
View
13 spec/redis_commands_spec.rb
@@ -572,6 +572,19 @@
end
end
+ it "gets a range by score of values from a zset with_scores" do
+ connect do |redis|
+ redis.zadd 'zset', 1, 'set'
+ redis.zadd 'zset', 2, 'set2'
+ redis.zadd 'zset', 3, 'set3'
+ redis.zadd 'zset', 4, 'set4'
+ command = redis.zrangebyscore('zset', 2, 3, "WITHSCORES")
+ command.callback { |r| r.should == ['set2', "2", 'set3', "3"] }
+ command.errback { |e| e.should be_false }
+ redis.del('zset') { done }
+ end
+ end
+
it "gets a score for a specific value in a zset (ZSCORE)" do
connect do |redis|
redis.zadd "zset", 23, "value"
Something went wrong with that request. Please try again.