test suite assertion: 0 == 1 is true?

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.

What am I missing?

Did you try WebPageCache.count.to_i == 1 or WebPageCache.count == '1' ?

Greg Donald wrote:

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?

between every test (or rather each test runs inside a transaction
which is rolled back). There should be no leakage of state from one
test to another.

Fred