{"size": 970, "ext": "js", "max_stars_repo_path": "spec/speed.js", "max_stars_repo_name": "argmaps/Backbone.Associations", "max_stars_repo_stars_event_min_datetime": "2015-03-11T22:25:25.000Z", "max_stars_repo_stars_event_max_datetime": "2015-03-11T22:25:25.000Z", "max_issues_repo_path": "spec/speed.js", "max_issues_repo_name": "argmaps/Backbone.Associations", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "spec/speed.js", "max_forks_repo_name": "argmaps/Backbone.Associations", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.9259259259, "max_line_length": 182, "alphanum_fraction": 0.6804123711}
(function(){
    IndependentModel = Backbone.AssociativeModel.extend({
        associations: function() {
            this.hasOne('dependentModel');
        }
    });

    DependentModel = Backbone.AssociativeModel.extend({
        associations: function() {
            this.belongsTo('independentModel');
        }
    });

    var dependentModel = new DependentModel(),
        independentModel = new IndependentModel();
    JSLitmus.test("set an association that does not declare a viaReverseKey, so that the reciprocal association has to be looked up by the model being set's class name", function() {
        dependentModel.set('independentModel', independentModel);
    });

    dependentModel.prepForAssociations();
    dependentModel.belongsTo('independentModel').viaReverseKey('dependentModel');
    JSLitmus.test("set an association that declares a viaReverseKey", function() {
        dependentModel.set('independentModel', independentModel);
    });

})();
