Sha256: d2a54f6b00d219d51dbb5b8bffa5d6d26bce731475ec355130e141f901299af7

Contents?: true

Size: 529 Bytes

Versions: 3

Compression:

Stored size: 529 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

3 entries across 3 versions & 1 rubygems

Version Path
pagarme-1.9.2 test/pagarme/object.rb
pagarme-1.9.1 test/pagarme/object.rb
pagarme-1.9 test/pagarme/object.rb