I must be missing something fundamental. In the test code below, the
assertion should fail unless WebPageCache.count == 1. But
WebPageCache.count is zero (according to the print statement and all
other evidence), yet the assertion passes.
Did you try WebPageCache.count.to_i == 1 or WebPageCache.count == '1' ?
For grins, yes. No change.
But I'm beginning to guess: are the db tables rolled back between EVERY
call to test? I thought they were rolled back at the end of the test
run, not between every test.
Asked another way: if web_page_caches starts as empty, what are the
expected results in the following?