Sha256: b4c7fc27d816bbb8bae901300cac595a14e1d003a14482a08cd7299b9149791b
Contents?: true
Size: 619 Bytes
Versions: 2
Compression:
Stored size: 619 Bytes
Contents
require 'spec_helper' class DumbLogger def info(msg) puts msg end end describe LazyResource do before :each do LazyResource.configure do |config| config.debug = true config.logger = DumbLogger.new end end describe '#logger' do it 'returns the logger' do LazyResource.logger.should_not be_nil end end describe '#debug' do it 'logs when a request completes' do LazyResource.logger.should_receive(:info) request = LazyResource::Request.new('http://example.com', User.new) request.on_complete_proc.call(Typhoeus::Response.new) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lazy_resource-0.3.3 | spec/lazy_resource/lazy_resource_spec.rb |
lazy_resource-0.3.2 | spec/lazy_resource/lazy_resource_spec.rb |