Sha256: a7e7d198eb3d67a797a3e23baeae1e8866357578dba522827a9c67b62d89e65a

Contents?: true

Size: 632 Bytes

Versions: 11

Compression:

Stored size: 632 Bytes

Contents

require 'test_helper'

class ParentsTest < Test::Unit::TestCase
  def test_parent
    hash = { "first" => "My first attribute.", :array_attribute => [1, 2] }
    institution = Institutions::Institution.new("my_inst", "My Institution", hash)
    parent_hash = { "first" => "parent first", :array_attribute => [1, 2, 3], :inherited_trait => "inherited" }
    parent_institution = Institutions::Institution.new("parent", "My Parent Institution", parent_hash)
    institution.merge_parent(parent_institution)
    assert_equal("My first attribute.", institution.first)
    assert_equal("inherited", institution.inherited_trait)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
institutions-0.1.3 test/institution/parents_test.rb
institutions-0.1.2 test/institution/parents_test.rb
institutions-0.1.1 test/institution/parents_test.rb
institutions-0.1.0 test/institution/parents_test.rb
institutions-0.0.7 test/institution/parents_test.rb
institutions-0.0.6 test/institution/parents_test.rb
institutions-0.0.5 test/institution/parents_test.rb
institutions-0.0.4 test/institution/parents_test.rb
institutions-0.0.3 test/institution/parents_test.rb
institutions-0.0.2 test/institution/parents_test.rb
institutions-0.0.1 test/institution/parents_test.rb