On 05/10/06, Tom W. [email protected] wrote:
On 04/10/06, Tom L. [email protected] wrote:
Yeah, I found what I’d written, but it’s a nasty hack, so I’m going to
clean it up a little and make it into a plugin. I’ll post it by the
end of the day.
Slightly later than promised, here’s the code, packaged as a plugin.
Unfortunately http access to my svn repository is down, so I’ve
created an archive:
Basic usage is something like:
assert_writes_fragment(:controller => :report, :action => :salary) do
assert_expires_fragment(:controller => :report, :action => :salary) do
There’s no need to clear/populate the cache with fragments before the
assertion. Also, the code should work as well in a unit test as a
functional one (useful if, like me, you expire fragments in a
different process to the web dispatcher).
If anyone finds it useful, let me know,