X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=test%2Ftest_main.rb;h=fe622e674a70fd2e1517f595023c40ffc370b04f;hb=c623a45b47d3061c47eac5abd4867913c9230b36;hp=a4a14504d463f1bf3f91786fd7b28445b1f4c97b;hpb=e04f6c2b90c9501fc613a130ee90863cc84f4a98;p=ruby-vorbistagger.git diff --git a/test/test_main.rb b/test/test_main.rb index a4a1450..fe622e6 100644 --- a/test/test_main.rb +++ b/test/test_main.rb @@ -250,6 +250,14 @@ EOF end end + def test_merge_bad_arg + Ogg::Vorbis::Tagger.open(OGG_FILE) do |t| + assert_raises(ArgumentError) do + t.comments.merge!(42) + end + end + end + def test_shift Ogg::Vorbis::Tagger.open(OGG_FILE) do |t| assert_equal(["artist", "Bolt Thrower"], t.comments.shift) @@ -295,4 +303,9 @@ EOF ensure FileUtils.rm_f("test/foo.bar") end + + def test_standalone_comments_object + o = Ogg::Vorbis::Comments.new + assert_equal(o.length, 0); + end end