ManageIQ/manageiq — pull request #728 by jrafanie (2014-09-26 19:07:09+00:00)
Title: Add test for autoloading of missing constants during yaml load.

Verified this works on ruby 1.9.3 and 2.0.0.

Part of #535

I feel dirty writing the file to disk and then deleting it... Not sure how else to test this.

With this [this initializer removed](https://github.com/ManageIQ/manageiq/blob/897e5ade1952756a57d6c16538cdaa6528424431/vmdb/config/initializers/yaml_autoloader.rb#L6), this spec fails on ruby 1.9.3 and 2.0.0:

```
1) Psych::Visitors::ToRuby missing constants during yaml load are autoloaded
Failure/Error: expect(YAML.load(dump).class.name).to eql "ZzzModel"
ArgumentError:
undefined class/module ZzzModel
```