README.md in flux_capacitor-0.1.4 vs README.md in flux_capacitor-0.2.0

- old
+ new

@@ -63,9 +63,23 @@ end ``` One note about using the string hashing method, new content could get the old feature for a while. +### Testing + +In order to test your code while migrating from one form to the other you can replace `Flux::Capacitor` with `Flux::Truthy` or `Flux::Falsy` They both expose the same API as a regular Capacitor but they `travel_to?` method will always return `true` and `false` respectively. + +When working with rails you can do something like this: +```ruby +start = DateTime.parse('2017/08/14 00:00:00-000') +end_point = DateTime.parse('2017/09/14') +oldest = MyModel.first.created_at +FEATURE_1_CAPACITOR = Rails.env.test? ? Flux::Falsy.new : Flux::Capacitor.new(start, end_point, oldest) +``` + +This will make it so for your tests everything will be treated as before. + ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).