Contract Tests between ours models and the backend


Ember.js Testing package is awesome. It allowed us to have fast specs to guarantee the defined behaviors. However, there’s no convention in Ember on how you should guarantee that your models, the heart of any Ember.js application, are valid against your backend.

Most people either manually test their apps or create end-to-end tests on the server-side, which is slow as hell (e.g think of Capybara if you’re a Rails dev) and usually a bad idea (further details in the Gist below). Here, I’d like to start a discussion on how to guarantee our models’ integrity.

I wrote a small gist with some ideas that may help many developers, containing actual code:

How do you guys solve that particular problem? Server-side tests?