From 742209b72ac9db3f44d8604a010b64062e474efc Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Fri, 11 Aug 2006 16:41:02 +0200 Subject: [PATCH] Added MainTest#test_modify_key. This test asserts that it's not possible to change the keys in the key-value pair arrays. --- test/test_main.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/test_main.rb b/test/test_main.rb index da3621c..cdcf0d8 100644 --- a/test/test_main.rb +++ b/test/test_main.rb @@ -206,4 +206,18 @@ EOF b["artist"] = "Foo" assert_equal(-1, a <=> b) end + + def test_modify_key + Ogg::Vorbis::Tagger.open(@ogg_buf) do |t| + assert_raises(TypeError) do + t.comments.keys.first.replace("new") + end + + t.comments["Foo"] = "Bar" + + assert_raises(TypeError) do + t.comments.keys.last.replace("new") + end + end + end end -- 2.30.2