projects
/
ruby-vorbistagger.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26a8d8e
)
Added MainTest#test_modify_key.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Fri, 11 Aug 2006 14:41:02 +0000
(16:41 +0200)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Wed, 23 Aug 2006 17:33:24 +0000
(19:33 +0200)
This test asserts that it's not possible to change the keys in the
key-value pair arrays.
test/test_main.rb
patch
|
blob
|
history
diff --git
a/test/test_main.rb
b/test/test_main.rb
index da3621cc3ef3c159164ea2d811775a6ac9bca0dd..cdcf0d8f8a7a13b601502afc34e63741fd40f9ec 100644
(file)
--- 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