rails/rails — pull request #6136 by mhfs (2012-05-03 03:32:41+00:00)
Title: Bring SqlByPassTest to light and fix broken tests

Test file `activerecord/test/cases/session_store/sql_bypass.rb` wasn't sufixed by `_test.rb` and so wasn't caught by the test suite.

Also, `SqlBypass` implemented a `new_record?` interface while the tests where expecting it to offer `persisted?`. Since this was part of a [commit](https://github.com/rails/rails/commit/f1c13b0dd7b22b5f6289ca1a09f1d7a8c7c8584b) that was then [reverted](https://github.com/rails/rails/commit/75015d1b5cae80826ef41add3c84d1dd51fee259) I wasn't sure which one was preferred. I went with `persisted?`.

And last but not least, forced session_id to be passed as a string to the sql queries since postgresql was complaining about type mismatch (string column vs integer value on where clause).

Cheers