--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jasmine-js+...@googlegroups.com.
To post to this group, send email to jasmi...@googlegroups.com.
Visit this group at http://groups.google.com/group/jasmine-js.
For more options, visit https://groups.google.com/d/optout.
//// Before
// Modelangular.module('AttachedFiles.Model.attachedFile', []);attachedFile.factory("AttachedFile", function() { var attachedFile = function() { // <-- anonymous function }; return attachedFile;});
// Testit("should be a <instance>", function() { var attachment = new AttachedFile(); log(attachment.constructor.name); // --> (empty string) expect(attachment).toEqual(jasmine.any(AttachedFile));});
//// After//
// Modelangular.module('AttachedFiles.Model.attachedFile', []);attachedFile.factory("AttachedFile", function() { var attachedFile = function AttachedFile() { // <-- named function "AttachedFile" }; return attachedFile;});
// Testit("should be a <instance>", function() { var attachment = new AttachedFile(); log(attachment.constructor.name); // --> AttachedFile expect(attachment.constructor.name).toEqual("AttachedFile");});
`class name`
of the object was in order to make sure that the returned objects were of that instance.