This removes the unnecessary warning about a preview path set to a location other than `/spec/mailers/preview`. This does not force `ActionMailer` to load when the Railtie runs by removing the `defined?` check. This is necessary because the `ActionMailer` class only loads it's settings once, after it is first loaded. If we load the class in our Railtie any custom settings declared in a config block in an initializer will be ignored. An improved spec suite for the different permutations of availability of action mailer previews is included as well.
For some reason the test-unit gem loads it's autorunner by default. Though the test-unit included with Ruby does not. The original code for loading test-unit pre-dates widespread usage of the test-unit gem. We took care of disabling the autorunner for Ruby 2.2+ since the test-unit gem is now required for Rails 3.2. For older Ruby versions we attempt to only load the `test/unit/assertions` module. When using the `test-unit` gem however, Rails will auto require it for us, which loads the main test-unit code, thus enabling the autorunner.
The previous constraint would only go as up as `4.2.0`, thus making `rspec-rails` incompatible with any of the patch releases of the rails 4.2.x series.