Sha256: f32dd2bf551dd65de966fa033a019d54e858ec29629de1d42284b9a43b573524
Contents?: true
Size: 1.33 KB
Versions: 1
Compression:
Stored size: 1.33 KB
Contents
require 'helper' require 'logger' describe Feedlr::Client do describe '#sandbox' do it 'should default to Feedlr.sandbox if not set' do Feedlr.configure do |c| c.sandbox = false c.logger = nil end client = Feedlr::Client.new expect(client.sandbox).to eq(Feedlr.sandbox) end it 'should have a value when set' do client = Feedlr::Client.new(sandbox: true) expect(client.sandbox).to eq(true) end end describe '#oauth_access_token' do it 'should default to Feedlr.oauth_access_token if not set' do Feedlr.configure { |c| c.oauth_access_token = 'test' } client = Feedlr::Client.new expect(client.oauth_access_token).to eq(Feedlr.oauth_access_token) end it 'should be have a value when set' do client = Feedlr::Client.new(oauth_access_token: 'new_test') expect(client.oauth_access_token).to eq('new_test') end end describe '#logger' do it 'should default to Feedlr.logger if not set' do Feedlr.configure { |c| c.logger = Logger.new(STDOUT) } client = Feedlr::Client.new expect(client.logger).to eq(Feedlr.logger) end it 'should be have a value when set' do logger = Logger.new(STDOUT) client = Feedlr::Client.new(logger: logger) expect(client.logger).to eq(logger) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
feedlr-0.1.0 | spec/feedly/client_spec.rb |