Sha256: bbc09ed92568b0d20b5eff03fc35424c923b3131b4660c98db8b2a38c658a86c

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

# require File.dirname(__FILE__) + '/spec_helper.rb'
# 
# search_attrs ={:name => 'test-search_queue', :queries => ['google','pathable']}
# 
# describe Tweetable::Queue, 'when adding to search queue' do 
#   before do 
#     RedisSpecHelper.reset
#   end
# 
#   it "should create search queue" do
#     Tweetable::Queue.add_to_search_queue(search_attrs[:name], search_attrs[:queries])
#     queue = Tweetable::SearchCollection.find(:name, search_attrs[:name]).first
#     queue.should_not be_nil
#   end
#   
#   it "should add queries to queue collection" do
#     Tweetable::Queue.add_to_search_queue(search_attrs[:name], search_attrs[:queries])
#     queue = Tweetable::SearchCollection.find(:name, search_attrs[:name]).first
#     queue.searches.size.should == 2    
#   end
#   
#   it "should process things passed to block" do
#     Tweetable::Queue.add_to_search_queue(search_attrs[:name], search_attrs[:queries]) do |search|
#       search.update(:query => 'xxx')
#     end    
#     queue = Tweetable::SearchCollection.find(:name, search_attrs[:name]).first
#     queue.searches.collect{|s| s.query}.should include('xxx')
#   end
# end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tweetable-0.1.14 spec/queue_spec.rb
tweetable-0.1.13 spec/queue_spec.rb
tweetable-0.1.11 spec/queue_spec.rb
tweetable-0.1.10 spec/queue_spec.rb