Skip to content

Instantly share code, notes, and snippets.

@nwjsmith
Created April 21, 2011 13:32
Show Gist options
  • Save nwjsmith/934473 to your computer and use it in GitHub Desktop.
Save nwjsmith/934473 to your computer and use it in GitHub Desktop.
require 'spec_helper'
require 'stringio'
describe BloomFilter, '#collision?' do
subject { object.collision?(word) }
let(:dictionary) { Dictionary.new }
let(:object) { described_class.new(dictionary) }
context 'checked with a filtered word' do
let(:word) { 'alpha' }
it { should be_true }
end
context 'checked with a word that has not been filtered' do
let(:word) { 'delta' }
it { should be_false }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment