Fix assertions in AR::TestCase::AttributeMethodsTest

This test has always been green because it uses "assert" and the first
argument is an truthy class/object.
Merge pull request #16998 from yuki24/fix-false-assertion

Fix false assertions in AR::TestCase::AttributeMethodsTest
Fix another false assertions

 * The assertions in AS::Duration don't actually assert.
 * The assertion in Railtie will pass even when `eager_load_namespaces`
   doesn't include `AppTemplate::Application` if `Rails.application` is
   truthy.

For more details, see here:

 * https://github.com/rails/rails/pull/16998
 * https://github.com/rails/rails/pull/17000