spec/processor/client_spec.rb in pupa-0.0.7 vs spec/processor/client_spec.rb in pupa-0.0.8
- old
+ new
@@ -1,4 +1,15 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Pupa::Processor::Client do
+ describe '.new' do
+ it 'should use the filesystem' do
+ ActiveSupport::Cache::FileStore.should_receive(:new).and_call_original
+ Pupa::Processor::Client.new(cache_dir: '/tmp', level: 'UNKNOWN').get('http://example.com/')
+ end
+
+ it 'should use Memcached' do
+ ActiveSupport::Cache::MemCacheStore.should_receive(:new).and_call_original
+ Pupa::Processor::Client.new(cache_dir: 'memcached://localhost', level: 'UNKNOWN').get('http://example.com/')
+ end
+ end
end