Fixed a regression introduced in 84cf156

84cf156 (PR #15694) introduced a subtle regression. There are actually three
distinct entry points to creating an AR object – via .new (i.e. #initialize),
via #init_with (e.g. from YAML or database queries) and via .allocate.

With the patch in 84cf156, attribute methods and respond_to? will not work
correctly when objects are allocated directly, without going through either

The reason this test case didn't catch the regression was that the `Topic`
class is shared between test cases, so by the time this test case is ran the
attribute methods are very likely to be defined.

Switching to use a fresh anonymous class in the test to ensure we surface this
problem in the future.
Dont swallow errors when bad alias_method
remove Set.new from DetailsKey::get, impacts rendering overhead performance

Using ruby-prof, I noticed that Set#add had the largest 'self time'
percentage (5% of the overall time spent rendering) when
benchmarking the rendering of a small cached ERB template that was 3
lines long. It turns out it was from this line. I don't believe the
Set is necessary, either. Removing this line increases the rendering
ips using Benchmark::ips accordingly.
Stop using mocha on app_rails_loader_test
Stop using mocha on configuration_test
Set the application logger using configuration
Stop using mocha on console_test
AttributeSet#include? -> AttributeSet#key?

https://github.com/rails/rails/pull/15868/files#r14135210
Treat invalid uuid as nil
Implement required #encode_with

While running the spec `ARCONN=mysql2 ruby -v -Itest
test/cases/yaml_serialization_test.rb`
the following warning shows up:
`implementing to_yaml is deprecated, please implement "encode_with"`
Move #encode_with to Relation
routed applications will respond to these methods
fix for 1.9 kwargs syntax
Fix 1.9. uggghhhhhh get it together @tenderlove :bomb:
Stop using mocha on dbconsole_test
Merge pull request #16138 from sgrif/sg-attribute-set-key

AttributeSet#include? -> AttributeSet#key?
use foreign key DSL in our tests.
document assert[_not]_empty, assert[_not]_includes, assert[_not]_predicate in testing guide.
link minitest assertions documentation.
Merge pull request #16187 from jone/testing-guide-assertions

Update assertion methods in testing guide [ci skip]