spec/cobweb/cobweb_job_spec.rb in cobweb-0.0.75 vs spec/cobweb/cobweb_job_spec.rb in cobweb-0.0.76
- old
+ new
@@ -28,11 +28,11 @@
:crawl_limit => nil,
:quiet => false,
:debug => false,
:cache => nil
}
- @redis = Redis::Namespace.new("cobweb-#{Cobweb.version}-#{@request[:crawl_id]}", Redis.new)
+ @redis = Redis::Namespace.new("cobweb-#{Cobweb.version}-#{@request[:crawl_id]}", :redis => Redis.new)
@cobweb = Cobweb.new @request
end
it "should not crawl anything if nothing has started" do
crawl = @cobweb.start(@base_url)
crawl_obj = CobwebCrawlHelper.new(crawl)
@@ -61,11 +61,11 @@
:crawl_limit => nil,
:quiet => false,
:debug => false,
:cache => nil
}
- @redis = Redis::Namespace.new("cobweb-#{Cobweb.version}-#{@request[:crawl_id]}", Redis.new)
+ @redis = Redis::Namespace.new("cobweb-#{Cobweb.version}-#{@request[:crawl_id]}", :redis => Redis.new)
@cobweb = Cobweb.new @request
end
it "should crawl entire site" do
@@ -91,11 +91,11 @@
:quiet => false,
:debug => false,
:cache => nil,
:valid_mime_types => ["text/html"]
}
- @redis = Redis::Namespace.new("cobweb-#{Cobweb.version}-#{@request[:crawl_id]}", Redis.new)
+ @redis = Redis::Namespace.new("cobweb-#{Cobweb.version}-#{@request[:crawl_id]}", :redis => Redis.new)
@cobweb = Cobweb.new @request
end
it "should only crawl html pages" do
crawl = @cobweb.start(@base_url)
@@ -116,10 +116,10 @@
:crawl_id => Digest::SHA1.hexdigest("#{Time.now.to_i}.#{Time.now.usec}"),
:quiet => false,
:debug => false,
:cache => nil
}
- @redis = Redis::Namespace.new("cobweb-#{Cobweb.version}-#{@request[:crawl_id]}", Redis.new)
+ @redis = Redis::Namespace.new("cobweb-#{Cobweb.version}-#{@request[:crawl_id]}", :redis => Redis.new)
end
# describe "crawling http://yepadeperrors.wordpress.com/ with limit of 20" do
# before(:each) do
# @request[:crawl_limit] = 20