Skip to content

Instantly share code, notes, and snippets.

View gsmaverick's full-sized avatar

Gavin Schulz gsmaverick

  • San Francisco, CA
View GitHub Profile
@gsmaverick
gsmaverick / specFilter.js
Created November 18, 2012 00:41
Spec filtering for Jasmine
/**
* Determines if the given jasmine spec should run based on whether it's highest
* level suite desciption match the value of the runMatch parameter in the url.
*
* @param {Spec} spec Jasmine spec object that is about to be executed.
*
* @returns {Boolean} True if spec should run, false if it should be skipped.
*/
var specFilter = function(spec){
/**
premise Infractions
1351 76
217 75
733 64
2181 64
1022 62
2249 60
416 58
929 56
1158 56
premise Infractions
1351 76
217 75
733 64
2181 64
1022 62
2249 60
416 58
929 56
1158 56
// The prototypes you added
MC.View = Backbone.View;
MC.View.prototype.Terms = Terms.m;
MC.View.prototype.formats = formats;
// In your view:
render : function() {
this.$el.html(this.template({
terms: this.Terms
// Put any other data you want in your template inside this object as well