glanotte/guard-migrate — pull request #17 by jasonnoble (2014-05-01 12:11:03+00:00)
Title: WARNING: db:test:clone is deprecated.

I generated a new Rails 4.1 app, with guard-migrate version 1.0.4. Once I add a migration, I get the following warning:

WARNING: db:test:clone is deprecated. The Rails test helper now maintains your test schema automatically, see the release notes for details.

Modifying my guard file to read:

guard :migrate, test_clone: false do

Makes the warning go away.

I'd suggest that for Rails 4.1+ the test_clone option be defaulted to false.

Questions:
1) Do you agree?

2) I attempted to fix it (see commit), but it looks like Rails is not loaded at the time this code is run. The following could work, but it seems heavy...

Gem::Version.new(`rails version`.gsub(/[^.\d]/, '')) <= Gem::Version.new("4.1.0")

3) Should I modify the tests (spec/guard/migrate_spec.rb:89) for this change? Are those the right tests to modify?

4) Another possibility would be changing the default value to false for version 1.1.0.