Sha256: a50a3d12e88b526ad93c392d67af7ca7badeb309bf6b7aaf2be87b729a57da34
Contents?: true
Size: 676 Bytes
Versions: 7
Compression:
Stored size: 676 Bytes
Contents
require 'spec_helper.rb' describe Paypal::Payment::Response::Address do let :keys do Paypal::Payment::Response::Address.optional_attributes end describe '.new' do it 'should allow nil for attributes' do payer = Paypal::Payment::Response::Address.new keys.each do |key| expect(payer.send(key)).to be_nil end end it 'should treat all attributes as String' do attributes = keys.inject({}) do |attributes, key| attributes.merge!(key => "xyz") end payer = Paypal::Payment::Response::Address.new attributes keys.each do |key| expect(payer.send(key)).to eq("xyz") end end end end
Version data entries
7 entries across 7 versions & 1 rubygems