rspec-redis_helper 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module RedisHelper
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -7,24 +7,4 @@ describe Redis, redis: true, redis_configuration: true do
7
7
  redis.should be_kind_of(Redis)
8
8
  end
9
9
 
10
- it "has sorted sets" do
11
- redis.zcard("it").should eq(0)
12
- redis.zadd("it", 2, "bar")
13
- redis.zadd("it", 3, "goo")
14
- redis.zcard("it").should eq(2)
15
- redis.zrange("it", 0, 0).should eq(["bar"]) # 0th item = smallest item
16
- redis.zrangebyscore( "it", 0, 1, limit: [0,1] ).should eq([])
17
- redis.zrangebyscore( "it", 0, 2, limit: [0,1] ).should eq(["bar"])
18
- end
19
-
20
- it "can select by score" do
21
- redis.zadd "it", 1, "a"
22
- redis.zadd "it", 2, "b"
23
- redis.zadd "it", 3, "c"
24
- redis.zadd "it", 4, "d"
25
- # inclusive by default http://redis.io/commands/zrangebyscore
26
- redis.zrangebyscore( "it", "-inf", 2 ).should eq(["a","b"])
27
- redis.zrangebyscore( "it", "-inf", 2, limit: [0,1] ).should eq(["a"])
28
- end
29
-
30
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-redis_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease: !!null
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire: !!null
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-24 00:00:00.000000000 -07:00
12
+ date: 2012-04-02 00:00:00.000000000 -07:00
13
13
  default_executable: !!null
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: redis
17
- requirement: &70134698045940 !ruby/object:Gem::Requirement
17
+ requirement: &70135483203620 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70134698045940
25
+ version_requirements: *70135483203620
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rake
28
- requirement: &70134698045300 !ruby/object:Gem::Requirement
28
+ requirement: &70135483203200 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *70134698045300
36
+ version_requirements: *70135483203200
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rspec
39
- requirement: &70134698044680 !ruby/object:Gem::Requirement
39
+ requirement: &70135483202780 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: '0'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70134698044680
47
+ version_requirements: *70135483202780
48
48
  description: Helper for RSpec tests which use Redis
49
49
  email:
50
50
  - mark.lanett@gmail.com