>  class Abberation
>    memoize :some_method
>  end
>
> will allow me to spec;
>
>  Abberation.memoized_methods.should include(:some_method)
>
> I'd prefer this rather than spec-ing
>
> Abberation.instance_methods.should include("_unmemoized_some_method")
>
> (I still don't get why it's not just an
> "alias_method_chain :some_method, :memoization")

Isn't that testing the *implementation* rather than the intended
effect?  I think it'd be better to test the memoization by ensuring
the method doesn't calculate the value twice, rather than asserting
(shoulding?) the thing is memoized?







-- 
Cheers

Koz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to