These are my first steps in testing in general so I don't know how to deal with it. On production I use REST adapter - Fixtures while developing.
For example having this User model:
Sks.User = DS.Model.extend
name: DS.attr("string")
email: DS.attr("string")
gravatar: Ember.computed(->
email = @get("email") || ""
"http://www.gravatar.com/avatar/" + MD5(email)
).property("email")
firstName: Ember.computed(->
fName = @get('name').split(' ')[0]
).property("name")
lastName: Ember.computed(->
lName = @get('name').split(' ')[1]
).property("name")
how can I test it using TDD/BDD with Jasmine? I suppose that I should test the logic: first name, last name and gravatar but how can I translate it into Jasmine? I've read a lot about testing recently but theory you know is different than practice and I just hit the wall. :(
Should I simulate server to get a JSON or should I use fixtures?