Only avoid running Test::Unit's Runner with config option when it is available or necessary

This commit is contained in:
Ben Atkins 2014-10-09 17:38:24 -04:00
parent b198a126e0
commit 8af1f6c768
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ require 'shoulda/matchers'
require 'ffaker'
# prevent Test::Unit's AutoRunner from executing during RSpec's rake task
Test::Unit.run = true if defined?(Test::Unit)
Test::Unit.run = true if defined?(Test::Unit) && Test::Unit.respond_to?(:run=)
# Checks for pending migrations before tests are run.
# If you are not using ActiveRecord, you can remove this line.