most of an implementation for activerecord 4 - belongs_to still not cached, but otherwise passing all tests.  belongs_to is hard as unfortunately the cached relation is on the right side of the merge call, whereas it was on the left in 3.x.
switch from test/unit to minitest.  not by choice - rails 4.1 loads minitest ~> 5.1 and that breaks test/unit loading (they aren't interested in fixing it).