Sha256: d966fcbe3d913c09b02e0e431b4df5b9eb8f0166f3ab4776dd5c7e4b50bfe213

Contents?: true

Size: 406 Bytes

Versions: 2

Compression:

Stored size: 406 Bytes

Contents

require "test/unit"
require "marc/subfield"

class SubfieldTest < Test::Unit::TestCase
  def test_ok
    s = MARC::Subfield.new("a", "foo")
    assert_equal(s.code, "a")
    assert_equal(s.value, "foo")
  end

  def test_equals
    s1 = MARC::Subfield.new("a", "foo")
    s2 = MARC::Subfield.new("a", "foo")
    assert_equal(s1, s2)

    assert_not_equal(s1, "a")
    assert_not_equal(s1, "foo")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
marc-1.3.0 test/tc_subfield.rb
marc-1.2.0 test/tc_subfield.rb