Sha256: 3cf6196318c59274af8639151e983d2a96e3adb1136e23cd2ca58f68335da926
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
# encoding: utf-8 require 'spec_helper' describe SEPA::Account do describe :new do it 'should not accept unknown keys' do expect { SEPA::Account.new foo: 'bar' }.to raise_error(NoMethodError) end end describe :name do it 'should accept valid value' do SEPA::Account.should accept('Gläubiger GmbH', 'Zahlemann & Söhne GbR', 'X' * 70, for: :name) end it 'should not accept invalid value' do SEPA::Account.should_not accept(nil, '', 'X' * 71, for: :name) end end describe :iban do it 'should accept valid value' do SEPA::Account.should accept('DE21500500009876543210', 'PL61109010140000071219812874', for: :iban) end it 'should not accept invalid value' do SEPA::Account.should_not accept(nil, '', 'invalid', for: :iban) end end describe :bic do it 'should accept valid value' do SEPA::Account.should accept('DEUTDEFF', 'DEUTDEFF500', 'SPUEDE2UXXX', for: :bic) end it 'should not accept invalid value' do SEPA::Account.should_not accept('', 'invalid', for: :bic) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sepa_king-0.3.0 | spec/account_spec.rb |
sepa_king-0.2.0 | spec/account_spec.rb |
sepa_king-0.1.0 | spec/account_spec.rb |