import jasmine-standalone-1.3.1.zip
[mkws-moved-to-github.git] / examples / jasmine / spec / SpecHelper.js
diff --git a/examples/jasmine/spec/SpecHelper.js b/examples/jasmine/spec/SpecHelper.js
new file mode 100644 (file)
index 0000000..e9b8284
--- /dev/null
@@ -0,0 +1,9 @@
+beforeEach(function() {
+  this.addMatchers({
+    toBePlaying: function(expectedSong) {
+      var player = this.actual;
+      return player.currentlyPlayingSong === expectedSong && 
+             player.isPlaying;
+    }
+  });
+});