redding/mr — pull request #151 by jcredding (2014-01-02 17:23:34+00:00)
Title: Update `MR::FakeRecord` to use new mixins

This updates the `MR::FakeRecord` to use the new mixins for it's
attributes, associations and persistence logic. This also removes
all the old logic, updates factories, stacks and test helpers to
work with the slight changes to the ActiveRecord interface that fake
records provide.

* Added a readable inspect for fake records. This is similar to
ActiveRecords and particularly doesn't show the saved or previous
attributes, which made the previous inspects hard to read.
* For factories and stacks, they can now use a simpler ActiveRecord
interface for there logic. Now that fake records
`reflect_on_all_associations` will take a type, it can be used
to find belongs to and has one associations instead of relying
on a manually selecting reflections using a `belongs_to?` or
`collection?` method.
* For the test helpers, the attributes now use string keys
instead of symbols. This was an inconsistency of fake record
with ActiveRecord that has been cleaned up.
* Switched the benchmarks back to using the full `MR::FakeRecord`
mixin and using the defined fakes for the test DB's records.
They had previously been changed to individually test the
mixins and make sure we weren't taking a performance hit.

@kellyredding - This is mostly deletions and re-running the benchmarks. I mentioned the important changes outside of those in the bullets, but I'll add comments so you can read through it easily.