spec/lib/sdk4me_spec.rb in 4me-sdk-1.2.0 vs spec/lib/sdk4me_spec.rb in 4me-sdk-2.0.0.pre.rc.1
- old
+ new
@@ -1,12 +1,12 @@
require 'spec_helper'
describe Sdk4me do
- it "should define a default configuration" do
+ it 'should define a default configuration' do
conf = Sdk4me.configuration.current
- expect(conf.keys.sort).to eq([:access_token, :account, :api_token, :api_version, :block_at_rate_limit, :ca_file, :host, :logger, :max_retry_time, :max_throttle_time, :proxy_host, :proxy_password, :proxy_port, :proxy_user, :read_timeout, :source])
+ expect(conf.keys.sort).to eq(%i[access_token account api_token api_version block_at_rate_limit ca_file host logger max_retry_time max_throttle_time proxy_host proxy_password proxy_port proxy_user read_timeout source])
expect(conf[:logger].class).to eq(::Logger)
expect(conf[:host]).to eq('https://api.4me.com')
expect(conf[:api_version]).to eq('v1')
@@ -14,20 +14,20 @@
expect(conf[:read_timeout]).to eq(25)
expect(conf[:block_at_rate_limit]).to be_truthy
expect(conf[:proxy_port]).to eq(8080)
- [:access_token, :api_token, :account, :source, :proxy_host, :proxy_user, :proxy_password].each do |no_default|
+ %i[access_token api_token account source proxy_host proxy_user proxy_password].each do |no_default|
expect(conf[no_default]).to be_nil
end
expect(conf[:ca_file]).to eq('../ca-bundle.crt')
end
- it "should define a logger" do
+ it 'should define a logger' do
expect(Sdk4me.logger.class).to eq(::Logger)
end
- it "should define an exception class" do
- expect { raise ::Sdk4me::Exception.new('test') }.to raise_error('test')
+ it 'should define an exception class' do
+ expect { raise ::Sdk4me::Exception, 'test' }.to raise_error('test')
end
-end
\ No newline at end of file
+end