aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/MatcherSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/scenario/MatcherSpec.js')
-rw-r--r--test/scenario/MatcherSpec.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/test/scenario/MatcherSpec.js b/test/scenario/MatcherSpec.js
deleted file mode 100644
index 2eddd2bc..00000000
--- a/test/scenario/MatcherSpec.js
+++ /dev/null
@@ -1,38 +0,0 @@
-describe('Matcher', function () {
- function executeFutures() {
- for(var i in $scenario.currentSpec.futures) {
- var future = $scenario.currentSpec.futures[i];
- future.behavior.call({}, function(value) { future.fulfill(value); });
- }
- }
- var matcher;
- beforeEach(function() {
- setUpContext();
- var future = $scenario.addFuture('Calculate first future', function(done) {
- done(123);
- });
- matcher = new Matcher(this, future);
-
- });
- it('should correctly match toEqual', function() {
- matcher.toEqual(123);
- executeFutures();
- });
- it('should throw an error when incorrect match toEqual', function() {
- matcher.toEqual(456);
- try {
- executeFutures();
- fail();
- } catch (e) {
- expect(e).toEqual('Expected 456 but was 123');
- }
- });
- it('should correctly match arrays', function() {
- var future = $scenario.addFuture('Calculate first future', function(done) {
- done(['a', 'b']);
- });
- matcher = new Matcher(this, future);
- matcher.toEqual(['a', 'b']);
- executeFutures();
- });
-}); \ No newline at end of file