Prefer rb_funcall2() over rb_funcall().
[ruby-vorbistagger.git] / test / test_main.rb
index a4a14504d463f1bf3f91786fd7b28445b1f4c97b..fe622e674a70fd2e1517f595023c40ffc370b04f 100644 (file)
@@ -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