spec/client_spec.rb in tokyo_api-1.5.1 vs spec/client_spec.rb in tokyo_api-1.6.0
- old
+ new
@@ -1,22 +1,24 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+# frozen_string_literal: true
+require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
+
describe TokyoApi::Client do
describe 'initialisation' do
subject { described_class.new(options) }
context 'with a basic_auth string parameter' do
- let(:options) { {basic_auth: 'login:password'} }
+ let(:options) { { basic_auth: 'login:password' } }
it 'should set username/password on the configuration' do
config = subject.connection.configuration
expect(config.username).to eq 'login'
expect(config.password).to eq 'password'
end
end
context 'with a timeout' do
- let(:options) { {timeout: 5} }
+ let(:options) { { timeout: 5 } }
it 'should set the timeout on the faraday options' do
config = subject.connection.configuration
expect(config.faraday_options[:request][:timeout]).to eq 5
end