Sha256: 105b290275ff0fcd0c6d99ba5402f8b18322f3522fc8cf46d47d106aa9451950

Contents?: true

Size: 662 Bytes

Versions: 40

Compression:

Stored size: 662 Bytes

Contents

require 'spec_helper.rb'

describe Paypal::Payment::Response::ShipTo do
  let :keys do
    Paypal::Payment::Response::ShipTo.optional_attributes
  end

  describe '.new' do
    it 'should allow nil for attributes' do
      payer = Paypal::Payment::Response::ShipTo.new
      keys.each do |key|
        payer.send(key).should 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::ShipTo.new attributes
      keys.each do |key|
        payer.send(key).should == "xyz"
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
paypal-express-0.2.9 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.2.8 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.2.7 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.2.6 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.2.5 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.2.4 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.2.3 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.2.2 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.2.1 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.2.0 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.1.0 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.0.9 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.0.8 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.0.7 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.0.6 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.0.5 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.0.4 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.0.3 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.0.2 spec/paypal/payment/response/ship_to_spec.rb
paypal-express-0.0.1 spec/paypal/payment/response/ship_to_spec.rb