redding/mr — pull request #147 by jcredding (2013-12-28 17:10:40+00:00)
Title: Add `MR::FakeRecord::Associations` mixin

This adds an associations mixin for fake records that contains all
the "association" related logic for fake records. This is to better
organize the behavior of fake records and make it easier to test.
This is an internal change and doesn't make any changes to the
fake record's behavior yet.

Overall, the associations were redesigned to more properly mimic
ActiveRecord. This meant separating out an association and
reflection class. These changes also worked to make the
associations logic maintainable and expandable for future needs.

Closes #68

@kellyredding - The writing a polymorphic association benchmarks went way up. I look into this and I think it's because I'm using dynamic classes. All the time is spent in generation it's `to_s`. I'll look into this again when I switch all the fake record logic to using these new mixins and change the benchmarks.