Use jasmine.addMatchers instead of reaching through jasmine.Expectation [finishes #59518946]

This commit is contained in:
Rajan Agaskar and Sheel Choksi
2013-10-29 18:35:17 -07:00
parent 04c7db9259
commit a2debf60b6

View File

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