Sha256: c823a6e8ce2b13ec94e690e416aee06b58ab28b602c1351cd98e2703777a041a
Contents?: true
Size: 603 Bytes
Versions: 5
Compression:
Stored size: 603 Bytes
Contents
require 'test/unit' require 'marc' class TestField < Test::Unit::TestCase def test_control control = MARC::ControlField.new('005', 'foobarbaz') assert_equal(control.to_s, '005 foobarbaz') end def test_field_as_control assert_raise(MARC::Exception) do # can't have a field with a tag < 010 field = MARC::DataField.new('007') end end def test_control_as_field assert_raise(MARC::Exception) do # can't have a control with a tag > 009 f = MARC::ControlField.new('245') end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
marc-0.0.8 | test/tc_controlfield.rb |
marc-0.0.9 | test/tc_controlfield.rb |
marc-0.1.0 | test/tc_controlfield.rb |
marc-0.1.2 | test/tc_controlfield.rb |
marc-0.1.3 | test/tc_controlfield.rb |