Sha256: c86646a3181cd5d1d2b1680543575f49a1d1f346c7e044eb68671f3132ef21d0

Contents?: true

Size: 531 Bytes

Versions: 3

Compression:

Stored size: 531 Bytes

Contents

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_equal object.attr1, 2

      object       = PagarMe::PagarMeObject.new
      object.attr1 = 2
      assert_equal object.attr1, 2
    end

    should 'be able to add nested attributes' do
      object = PagarMe::PagarMeObject.new nested: { attrib: 2 }
      assert_equal object.nested.attrib, 2
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pagarme-2.1.2 test/pagarme/object_test.rb
pagarme-2.1.1 test/pagarme/object_test.rb
pagarme-2.1.0 test/pagarme/object_test.rb