Sha256: ed145ff05a0e48396accca11d8ce3a9bfa92716f28a04574a00f7753025e4182
Contents?: true
Size: 1.01 KB
Versions: 16
Compression:
Stored size: 1.01 KB
Contents
require 'spec_helper' require 'rakuten_web_service/configuration' describe RakutenWebService::Configuration do describe '.configuration' do context 'given block has one arity' do before do RakutenWebService.configuration do |c| c.affiliate_id = 'dummy_affiliate_id' c.application_id = 'dummy_application_id' end end subject { RakutenWebService.configuration } its(:affiliate_id) { should eq('dummy_affiliate_id') } its(:application_id) { should eq('dummy_application_id') } end context 'given block has more or less one arity' do specify 'raise ArgumentError' do expect do RakutenWebService.configuration do end end.to raise_error(ArgumentError) expect do RakutenWebService.configuration do |c, _| c.affiliate_id = 'dummy_affiliate_id' c.application_id = 'dummy_application_id' end end.to raise_error(ArgumentError) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems