public
Rubygem
Description: Ultra lightweight gem/plugin to do in-memory caching of any Ruby method
Homepage: http://github.com/JackDanger/simple_memoize
Clone URL: git://github.com/JackDanger/simple_memoize.git
Search Repo:
Check that an error is raised when attempting to memoize a non-method
Jack Danger Canty (author)
Wed Mar 26 13:32:24 -0700 2008
commit  33d0c969f1747f93acaf1bc5906ddc7d3ab2be4f
tree    344495f9769ebbaa42f59b833fc30765101fe2b3
parent  29ec74c4cd2e09938854fbb558b049fa16c8f926
...
107
108
109
 
 
 
 
110
...
107
108
109
110
111
112
113
114
0
@@ -107,5 +107,9 @@
0
     assert dog.private_methods.include?('private_growl_without_memo')
0
     assert dog.private_methods.include?('private_growl')
0
   end
0
+
0
+ def test_cant_memoize_a_missing_method
0
+ assert_raises(NoMethodError) { Barks.memoize :totally_bad_method_name }
0
+ end
0
 end

Comments

    No one has commented yet.