Sha256: d546f8c620e2f4011dac5ba9fcf172dd1d592cea364c5b854d1316821aa9f8b2
Contents?: true
Size: 525 Bytes
Versions: 7
Compression:
Stored size: 525 Bytes
Contents
require 'test_helper' require 'razorpay/entity' module Razorpay # Tests for Razorpay::Entity class EntityTest < Minitest::Test def setup @hash = { 'a' => 1 } @entity = Entity.new(@hash) end def test_attribute_get assert_equal @hash['a'], @entity.a end def test_json_conversion assert_equal '{"a":1}', @entity.to_json end def test_invalid_attribute_get assert_raises(NameError, 'It must raise a NameError on invalid attribute') { @entity.b } end end end
Version data entries
7 entries across 7 versions & 1 rubygems