Update examples for 2.0

This commit is contained in:
Greg Cobb and JR Boyens
2013-07-16 10:00:16 -07:00
parent c91df21a96
commit 0daae4d7b4
2 changed files with 16 additions and 10 deletions

View File

@@ -1,9 +1,15 @@
beforeEach(function() {
addMatchers({
toBePlaying: function(expectedSong) {
var player = this.actual;
return player.currentlyPlayingSong === expectedSong &&
player.isPlaying;
}
});
beforeEach(function () {
jasmine.Expectation.addMatchers({
toBePlaying: function () {
return {
compare: function (actual, expected) {
var player = actual;
return {
pass: player.currentlyPlayingSong === expected && player.isPlaying
}
}
};
}
});
});