strongloop/loopback — pull request #330 by bajtos (2014-06-16 07:58:29+00:00)
Title: lib/application: Remove forgotten `loopback` ref

Use `registry.Model` instead of `loopback.Model`.

I am intentionally leaving out the test for this fix. `test/support.js` installs a global `loopback` variable, which makes for rather ugly code in the test that is supposed to fail when the tested code uses an undefined `loopback` variable.

```js
it('throws when the ctor is not a Model', function() {
var lb = global.loopback;
global.loopback = undefined;

try {
var ctor = function NotModel() {};
expect(function() { app.model(ctor); })
.to.throw(/descendant of loopback\.Model/);
} finally {
global.loopback = lb;
}
});
```
/cc @ritch