Sha256: b15ccf679179df8e916ec6d88cdb0f92c533b4dbc80b29b08a7641d88b77ea4a
Contents?: true
Size: 917 Bytes
Versions: 2
Compression:
Stored size: 917 Bytes
Contents
# coding: utf-8 require 'spec_helper' module COS describe Struct do it 'should raise AttrError when miss required atrrs' do expect do Config.new({ app_id: '100000', secret_id: 'secret_id', }) end.to raise_error(AttrError) end it 'should raise AttrError when give extra attrs' do expect do Config.new({ aaaa: 11111, app_id: '100000', secret_id: 'secret_id', secret_key: 'secret_key', protocol: 'http', default_bucket: 'bucket_name' }) end.to raise_error(AttrError) end it 'should use default logger' do Logging.instance_variable_set(:@logger, nil) expect(Logging.logger.level).to eq(Logger::INFO) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cos-0.1.2 | spec/cos/struct_spec.rb |
cos-0.1.1 | spec/cos/struct_spec.rb |