Slide 114
Slide 114 text
test driven refactoring...
describe("PostStatus", function() {
var $el, collection, view;
beforeEach(function() {
$el = $("It's easy!");
collection = {create: jasmine.createSpy('create')};
view = new View.PostStatus({
el: $el,
collection: collection
});
});
describe("submitting the form", function() {
it("creates a status", function() {
$el.trigger('submit');
expect(collection.create).toHaveBeenCalledWith(