Skip to content

Commit

Permalink
Added test case for Factory#define inheritance, fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ranweiler committed Apr 11, 2013
1 parent b66807e commit a828382
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/factory_spec.js
Expand Up @@ -27,6 +27,22 @@ describe('Factory#define', function() {
}
})
})

it('inherits from already-defined models by name', function() {
Factory.define('testChild', 'test', {
name: 'Test Model Child'
})

expect(Factory.patterns.testChild).toEqual({
class: TestModel,
attributes: {
name: 'Test Model Child',
real: false,
dynamic: dynamic_function,
called: callback_function
}
})
})
})

describe('Factory#build', function() {
Expand Down

0 comments on commit a828382

Please sign in to comment.