Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix test deprecation warnings (#1018)
* Use Pathname.new in install_generator_spec Fix DEPRECATION WARNING: The `exist` matcher overrides one built-in by RSpec; use `expect(Pathname.new(path)).to exist` instead * Disable config.active_record.legacy_connection_handling Fix DEPRECATION WARNING: Using legacy connection handling is deprecated. Please set `legacy_connection_handling` to `false` in your application. * Add #get_migration helper Using `Pathname.new` in tests results in a Hound error because of line length. * Only use legacy_connection_handling false for Rails < 7.1 When using the 7.1 gemfile, we get this complaint: "The `legacy_connection_handling` setter was deprecated in 7.0 and removed in 7.1, but is still defined in your configuration. Please remove this call as it no longer has any effect." This change also sets legacy_connection_handling for Rails versions before 7.1. --------- Co-authored-by: Sara Jackson <csara@thoughtbot.com>
- Loading branch information