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
Deprecate ActiveModel::Dirty#reset_changes in favor of #clear_changes_information

This method name is causing confusion with the `reset_#{attribute}`
methods. While `reset_name` set the value of the name attribute for the
previous value the `reset_changes` only discard the changes and previous
changes.
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"`
Deprecate `reset_#{attribute}` in favor of `restore_#{attribute}`.

These methods may cause confusion with the `reset_changes` that
behaves differently
of them.

Also rename undo_changes to restore_changes to match this new set of
methods.
Merge pull request #16180 from rafaelfranca/rm-dirty

Improve Active Model Dirty API.
RouteSet should be in charge of constructing the dispather

Now we can override how requests are dispatched in the routeset object
remove useless ivar set
set `set` in the setup method
execute a request and check the path_parameters

This actually runs a request through the system, using the actual
routing methods as we would use in production, then tests the
path_parameters set on the request object.  The `recognize_path` method
isn't actually used in production, so testing what it returns isn't
useful.
stop calling url_for with recall parameters and actually use a request
fix warnings
rack 1.6 encodes the filenames in posts correctly now