Skip to content
Browse files

fix spec tests

  • Loading branch information...
1 parent 91ec1ab commit 67500f8be2ca4c2d72902a4a2e8984ac5b293fa1 @igrigorik committed Mar 16, 2012
Showing with 15 additions and 11 deletions.
  1. +5 −2 Gemfile.lock
  2. +3 −2 spec/counting_redis_spec.rb
  3. +3 −2 spec/native_spec.rb
  4. +4 −5 spec/redis_spec.rb
View
7 Gemfile.lock
@@ -1,15 +1,17 @@
PATH
remote: .
specs:
- bloomfilter-rb (2.0.0)
+ bloomfilter-rb (2.1.1)
redis
GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.2)
rake (0.8.7)
- redis (2.2.0)
+ rake-compiler (0.8.0)
+ rake
+ redis (2.2.2)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
@@ -25,4 +27,5 @@ PLATFORMS
DEPENDENCIES
bloomfilter-rb!
rake
+ rake-compiler
rspec
View
5 spec/counting_redis_spec.rb
@@ -1,7 +1,8 @@
require 'helper'
-describe BloomFilter::CountingRedis do
- include BloomFilter
+include BloomFilter
+
+describe CountingRedis do
context "use Redis for storage" do
it "should store data in Redis" do
View
5 spec/native_spec.rb
@@ -1,7 +1,8 @@
require 'helper'
-describe BloomFilter::Native do
- include BloomFilter
+include BloomFilter
+
+describe Native do
it "should clear" do
bf = Native.new(:size => 100, :hashes => 2, :seed => 1, :bucket => 3, :raise => false)
View
9 spec/redis_spec.rb
@@ -1,10 +1,9 @@
require 'helper'
describe BloomFilter::Redis do
- include BloomFilter
context "use Redis bitstring for storage" do
- let(:bf) { Redis.new }
+ let(:bf) { BloomFilter::Redis.new }
it "should store data in Redis" do
bf.insert(:abcd)
@@ -39,12 +38,12 @@
end
it "should connect to remote redis server" do
- lambda { Redis.new }.should_not raise_error
+ lambda { BloomFilter::Redis.new }.should_not raise_error
end
it "should allow namespaced BloomFilters" do
- bf1 = Redis.new(:namespace => :a)
- bf2 = Redis.new(:namespace => :b)
+ bf1 = BloomFilter::Redis.new(:namespace => :a)
+ bf2 = BloomFilter::Redis.new(:namespace => :b)
bf1.insert('test')
bf1.include?('test').should be_true

0 comments on commit 67500f8

Please sign in to comment.
Something went wrong with that request. Please try again.