Sha256: 096e3cdbb1bff918504508f822ef3635eb0e678d5c650c9e56bb3da27f8552b5
Contents?: true
Size: 913 Bytes
Versions: 1
Compression:
Stored size: 913 Bytes
Contents
require 'spec_helper' describe ::Tfl::Client do let(:app_id) { 'my app id' } let(:app_key) { 'my app key' } let(:client) { described_class.new(app_id: app_id, app_key: app_key) } context 'when initialized with block' do subject(:client) do described_class.new do |config| config.app_id = app_id config.app_key = app_key end end it { is_expected.to have_attributes(:app_id => app_id, :app_key => app_key) } end context 'when initialized with hash' do subject(:client) { described_class.new(app_id: app_id, app_key: app_key) } it { is_expected.to have_attributes(:app_id => app_id, :app_key => app_key) } end describe '#credentials' do it 'returns a hash' do expect(client.credentials).to eq({:app_id => app_id, :app_key => app_key}) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tfl-0.0.2 | spec/lib/tfl/client_spec.rb |