rails/rails — pull request #8312 by senny (2012-11-25 13:00:58+00:00)
Title: make sure that individual parts `ActiveModel` can be required by itself

We do a lot of isolated tests. This process revelad that some modules of `ActiveModel` can not be required by itself. I created a test script to verify, that all the parts of `ActiveModel` can be loaded in isolation. The initial output of the script was:

```
verifying active_model/attribute_methods: FAILED (uninitialized constant ActiveModel::AttributeMethods::ActiveSupport)
verifying active_model/callbacks: DONE
verifying active_model/conversion: FAILED (uninitialized constant ActiveSupport::Concern)
verifying active_model/dirty: FAILED (uninitialized constant ActiveModel::AttributeMethods::ActiveSupport)
verifying active_model/errors: DONE
verifying active_model/model: DONE
verifying active_model/naming: FAILED (undefined method `delegate' for ActiveModel::Name:Class)
verifying active_model/observing: FAILED (uninitialized constant ActiveSupport::Concern)
verifying active_model/serialization: DONE
verifying active_model/translation: FAILED (uninitialized constant ActiveModel::Naming)
verifying active_model/validations: FAILED (undefined method `alias_method_chain' for Range:Class)
```

I added the necessary require statements to the `ActiveModel` parts to make every piece loadable.

I placed the script under `test/load_individual_parts.rb` but I was not sure how to integrate it into the test suite. Currently you can execute it using:

`bundle exec ruby test/load_individual_parts.rb`

#### cleanup

* There were some broken whitespace (non-breaking). I cleaned those up.