Sha256: a3b826120affcbc9ab7f7d0654c2ace8771b9a7aa47ea39721e380255fab5a77

Contents?: true

Size: 596 Bytes

Versions: 11

Compression:

Stored size: 596 Bytes

Contents

# encoding: utf-8
require_relative '../test_helper'

module PagarMe
  class ObjectTest < Test::Unit::TestCase
    should 'be able to create object and add any attribute' do
      object = PagarMe::PagarMeObject.new({
        :attr1 => 2
      }) 

      assert object.attr1 == 2

      object = PagarMe::PagarMeObject.new
      object.attr1 = 2

      assert object.attr1 == 2
    end

    should 'be able to add nested attributes' do 
      object = PagarMe::PagarMeObject.new({
        :nested => {
          :attr => 2
        }
      })

      assert object.nested.attr = 2
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pagarme-2.0.2 test/pagarme/object.rb
pagarme-2.0.1 test/pagarme/object.rb
pagarme-2.0.0 test/pagarme/object.rb
pagarme-1.10.0 test/pagarme/object.rb
pagarme-1.9.9 test/pagarme/object.rb
pagarme-1.9.8 test/pagarme/object.rb
pagarme-1.9.7 test/pagarme/object.rb
pagarme-1.9.6 test/pagarme/object.rb
pagarme-1.9.5 test/pagarme/object.rb
pagarme-1.9.4 test/pagarme/object.rb
pagarme-1.9.3 test/pagarme/object.rb