title: Unit test Ember models without application running
body: <p>What is the best way to unit test an Ember model without the application running in the test framework?</p>
  
  <p>I couldn't find much information about how to do this. I got something like the following to work, which I think covers my needs, but is there a smarter way to do this? I'm stabbing at the dark a bit with this attempt so I'm guessing there is.</p>
  
  <pre><code>`import { test, moduleFor } from 'ember-qunit'`    
  `import Subject from 'school/models/subject'`
  `import Student from 'school/models/student'`
  
  #Use subclass to remove relationships, add default values so set functions work.
  SubjectTester = Subject.extend {
      students: null
      name: ''
  }
  StudentTester = Student.extend {
      subject: null
      name: ''
      height: 0
  }
  
  moduleFor('model:subject')
  
  #Use _create to skip the store, manually set up relationships
  test('Computes tallest student description', -&gt;
      elise = StudentTester._create()
      elise.set('height', 165)
      elise.set('name', 'Elise')
  
      jasmine = StudentTester._create()
      jasmine.set('height', 170)
      jasmine.set('name', 'Jasmine')
  
      subject = SubjectTester._create()
      subject.set('name', 'Maths')
      subject.set('students', [elise, jasmine])
  
      equal(subject.get('tallestStudentDesc'), 'Jasmine is the tallest student in Maths')
  )
  </code></pre>
  
  <p>I initially tried using reopen instead of subclassing but couldn't clean up  the changes properly...</p>
  
  <p>Would it better to set up test containers and stores? Should I just use integration tests? Am I missing something really obvious? Any pointers will be greatly appreciated.</p>