redding/mr — pull request #140 by jcredding (2013-12-01 04:19:35+00:00)
Title: Use type casting in `MR::Factory` data generation methods

This switches the `MR::Factory` to use ActiveRecord type casting.
This is so record, model and read model factories will fill in
data with similar data as a real scenario using ActiveRecord. This
is more consistent and requires less "forcing" of data to be the
same (like `DateTime` vs `Time` objects) in tests.

* `decimal` will now return a `BigDecimal` instead of a `Float`.
* `time` will return a `Time` object, but the date will be
locked to some dummy value by ActiveRecord. This is how they
type cast pure time (hours, min, seconds) values.
* `datetime` will most likely return a `Time` object, but can
return `DateTime` objects. This depends on the year that is
used. This is ActiveRecord's type-casting behavior.
* `timestamp` will return like the `datetime` method. This is
what ActiveRecord's type-casting behavior does.
* `boolean` will now return `true` and `false` values. Prevously,
it always returned `true`.