Revision
812
Author
eloy.de.enige@gmail.com
Date
2009-02-12 11:06:06 -0800 (Thu, 12 Feb 2009)

Log Message

Improved immutable hash test.

Modified Paths

Diff

Modified: MacRuby/trunk/test-macruby/cases/hash_test.rb (811 => 812)


--- MacRuby/trunk/test-macruby/cases/hash_test.rb	2009-02-12 19:00:10 UTC (rev 811)
+++ MacRuby/trunk/test-macruby/cases/hash_test.rb	2009-02-12 19:06:06 UTC (rev 812)
@@ -11,10 +11,11 @@
     end
 
     # FIXME: This causes a segfault.
-    it "should not modify an immutable instance" do
+    it "should not modify an immutable instance and raise a RuntimeError" do
       [NSDictionary.new, NSDictionary.alloc.init].each do |hash|
-        assert_raise(RuntimeError) { hash['key'] = 'value' }
         assert_raise(RuntimeError) { hash.clear }
+        assert_raise(RuntimeError) { hash[:key] = :value }
+        assert_nil hash[:key]
       end
     end