Skip to content

Commit

Permalink
Fixed failing spec due to backbone upgrade
Browse files Browse the repository at this point in the history
_listeners has been changed to _listeningTo.

[See diff](jashkenas/backbone@1.0.0...1.1.0#diff-0d56d0d310de7ff18b3cef9c2f8f75dcL154)
  • Loading branch information
jmorrell authored and samccone committed Oct 18, 2013
1 parent f3c632d commit baed36b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spec/javascripts/collectionView.reset.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ describe("collection view - reset", function(){
});

it("should remove the event handlers for the original children", function(){
expect(_.size(collectionView._listeners)).toBe(4);
// maintain backwards compatibility with backbone 1.0.0 in tests
if (typeof collectionView._listeningTo != "undefined") {
expect(_.size(collectionView._listeningTo)).toBe(4);
} else {
expect(_.size(collectionView._listeners)).toBe(4);
}
});
});

Expand Down

0 comments on commit baed36b

Please sign in to comment.