opal-rails 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,5 +2,5 @@
2
2
  # = require opal-jquery
3
3
 
4
4
  Document.ready? do
5
- Spec::Runner.new.run
5
+ OpalSpec::Runner.new.run
6
6
  end
@@ -1,12 +1,12 @@
1
1
  // lib/opal-spec/browser_formatter.rb
2
2
  (function() {
3
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module, __klass = __opal.klass;
3
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __module = __opal.module, __klass = __opal.klass;
4
4
 
5
5
  return (function(__base){
6
- // line 1, opal-spec/browser_formatter, module Spec
7
- function Spec() {};
8
- Spec = __module(__base, "Spec", Spec);
9
- var Spec_prototype = Spec.prototype, __scope = Spec._scope;
6
+ // line 1, opal-spec/browser_formatter, module OpalSpec
7
+ function OpalSpec() {};
8
+ OpalSpec = __module(__base, "OpalSpec", OpalSpec);
9
+ var OpalSpec_prototype = OpalSpec.prototype, __scope = OpalSpec._scope;
10
10
 
11
11
  (function(__base, __super){
12
12
  // line 2, opal-spec/browser_formatter, class BrowserFormatter
@@ -48,15 +48,23 @@
48
48
  target.appendChild(groups_element);
49
49
 
50
50
  var styles = document.createElement('style');
51
- styles.innerHTML = __scope.CSS;
52
- document.head.appendChild(styles);
51
+ styles.type = 'text/css';
52
+
53
+ if (styles.styleSheet) {
54
+ styles.styleSheet.cssText = __scope.CSS;
55
+ }
56
+ else {
57
+ styles.appendChild(document.createTextNode(__scope.CSS));
58
+ }
59
+
60
+ document.getElementsByTagName('head')[0].appendChild(styles);
53
61
 
54
62
  this.start_time = __scope.Time.$now().$to_f();
55
63
  this.groups_element = groups_element;
56
64
  return this.summary_element = summary_element;
57
65
  };
58
66
 
59
- // line 88, opal-spec/browser_formatter, BrowserFormatter#finish
67
+ // line 96, opal-spec/browser_formatter, BrowserFormatter#finish
60
68
  BrowserFormatter_prototype.$finish = function() {
61
69
  var time = nil, text = nil, __a, __b;
62
70
  time = (__a = __scope.Time.$now().$to_f(), __b = this.start_time, typeof(__a) === 'number' ? __a - __b : __a['$-'](__b));
@@ -64,7 +72,7 @@
64
72
  return this.summary_element.innerHTML = text;
65
73
  };
66
74
 
67
- // line 95, opal-spec/browser_formatter, BrowserFormatter#example_group_started
75
+ // line 103, opal-spec/browser_formatter, BrowserFormatter#example_group_started
68
76
  BrowserFormatter_prototype.$example_group_started = function(group) {
69
77
 
70
78
  this.example_group = group;
@@ -87,7 +95,7 @@
87
95
  return this.example_list = example_list;
88
96
  };
89
97
 
90
- // line 118, opal-spec/browser_formatter, BrowserFormatter#example_group_finished
98
+ // line 126, opal-spec/browser_formatter, BrowserFormatter#example_group_finished
91
99
  BrowserFormatter_prototype.$example_group_finished = function(group) {
92
100
  var __a;
93
101
  if ((__a = this.example_group_failed) !== false && __a !== nil) {
@@ -97,23 +105,23 @@
97
105
  };
98
106
  };
99
107
 
100
- // line 126, opal-spec/browser_formatter, BrowserFormatter#example_started
108
+ // line 134, opal-spec/browser_formatter, BrowserFormatter#example_started
101
109
  BrowserFormatter_prototype.$example_started = function(example) {
102
110
 
103
111
  this.examples['$<<'](example);
104
112
  return this.example = example;
105
113
  };
106
114
 
107
- // line 131, opal-spec/browser_formatter, BrowserFormatter#example_failed
115
+ // line 139, opal-spec/browser_formatter, BrowserFormatter#example_failed
108
116
  BrowserFormatter_prototype.$example_failed = function(example) {
109
117
  var exception = nil, $case = nil, output = nil;
110
118
  this.failed_examples['$<<'](example);
111
119
  this.example_group_failed = true;
112
120
  exception = example.$exception();
113
- $case = exception;if ((__scope.Spec)._scope.ExpectationNotMetError['$===']($case)) {
121
+ $case = exception;if ((__scope.OpalSpec)._scope.ExpectationNotMetError['$===']($case)) {
114
122
  output = exception.$message()
115
123
  }
116
- else {output = "" + (exception['$class']()) + ": " + (exception.$message()) + "\n";
124
+ else {output = "" + (exception.$class().$name()) + ": " + (exception.$message()) + "\n";
117
125
  output = output['$+'](" " + (exception.$backtrace().$join("\n ")) + "\n");};
118
126
 
119
127
  var wrapper = document.createElement('li');
@@ -135,7 +143,7 @@
135
143
 
136
144
  };
137
145
 
138
- // line 168, opal-spec/browser_formatter, BrowserFormatter#example_passed
146
+ // line 176, opal-spec/browser_formatter, BrowserFormatter#example_passed
139
147
  BrowserFormatter_prototype.$example_passed = function(example) {
140
148
 
141
149
 
@@ -151,32 +159,32 @@
151
159
 
152
160
  };
153
161
 
154
- // line 182, opal-spec/browser_formatter, BrowserFormatter#example_count
162
+ // line 190, opal-spec/browser_formatter, BrowserFormatter#example_count
155
163
  BrowserFormatter_prototype.$example_count = function() {
156
164
 
157
165
  return this.examples.$size();
158
166
  };
159
- ;BrowserFormatter._donate(["$initialize", "$start", "$finish", "$example_group_started", "$example_group_finished", "$example_started", "$example_failed", "$example_passed", "$example_count"]);
160
- })(Spec, null)
167
+
168
+ })(OpalSpec, null)
161
169
 
162
170
  })(self)
163
171
  })();
164
172
  // lib/opal-spec/example.rb
165
173
  (function() {
166
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module, __klass = __opal.klass;
174
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __module = __opal.module, __klass = __opal.klass;
167
175
 
168
176
  return (function(__base){
169
- // line 1, opal-spec/example, module Spec
170
- function Spec() {};
171
- Spec = __module(__base, "Spec", Spec);
172
- var Spec_prototype = Spec.prototype, __scope = Spec._scope;
177
+ // line 1, opal-spec/example, module OpalSpec
178
+ function OpalSpec() {};
179
+ OpalSpec = __module(__base, "OpalSpec", OpalSpec);
180
+ var OpalSpec_prototype = OpalSpec.prototype, __scope = OpalSpec._scope;
173
181
 
174
182
  (function(__base, __super){
175
183
  // line 2, opal-spec/example, class Example
176
184
  function Example() {};
177
185
  Example = __klass(__base, __super, "Example", Example);
178
- var Example_prototype = Example.prototype, __scope = Example._scope;
179
- Example_prototype.description = Example_prototype.example_group = Example_prototype.exception = Example_prototype.__block__ = nil;
186
+ var Example_prototype = Example.prototype, __scope = Example._scope, TMP_1, TMP_2;
187
+ Example_prototype.description = Example_prototype.example_group = Example_prototype.exception = Example_prototype.asynchronous = Example_prototype.__block__ = nil;
180
188
 
181
189
  // line 3, opal-spec/example, Example#description
182
190
  Example_prototype.$description = function() {
@@ -194,7 +202,18 @@
194
202
  return this.exception
195
203
  };
196
204
 
197
- // line 5, opal-spec/example, Example#initialize
205
+ // line 4, opal-spec/example, Example#asynchronous
206
+ Example_prototype.$asynchronous = function() {
207
+
208
+ return this.asynchronous
209
+ },
210
+ // line 4, opal-spec/example, Example#asynchronous=
211
+ Example_prototype['$asynchronous='] = function(val) {
212
+
213
+ return this.asynchronous = val
214
+ };
215
+
216
+ // line 6, opal-spec/example, Example#initialize
198
217
  Example_prototype.$initialize = function(group, desc, block) {
199
218
 
200
219
  this.example_group = group;
@@ -202,77 +221,119 @@
202
221
  return this.__block__ = block;
203
222
  };
204
223
 
205
- // line 11, opal-spec/example, Example#run_before_hooks
206
- Example_prototype.$run_before_hooks = function() {
207
- var __a, __b;
208
- return (__b = this.example_group.$before_hooks(), __b.$each._p = (__a = function(before) {
209
-
210
- var __a;
211
- if (before == null) before = nil;
224
+ // line 12, opal-spec/example, Example#finish_running
225
+ Example_prototype.$finish_running = function() {
226
+ var __a;
227
+ if ((__a = this.exception) !== false && __a !== nil) {
228
+ return this.example_group.$example_failed(this)
229
+ } else {
230
+ return this.example_group.$example_passed(this)
231
+ };
232
+ };
212
233
 
213
- return (__a = this, __a.$instance_eval._p = before.$to_proc(), __a.$instance_eval())
214
- }, __a._s = this, __a), __b.$each());
234
+ // line 20, opal-spec/example, Example#run
235
+ Example_prototype.$run = function() {
236
+ var e = nil, __a, __b;
237
+ try {
238
+ this.example_group.$example_started(this);
239
+ this.$run_before_hooks();
240
+ (__a = this, __a.$instance_eval._p = this.__block__.$to_proc(), __a.$instance_eval());
241
+ } catch ($err) {
242
+ if (true) {
243
+ e = $err;this.exception = e}
244
+ else { throw $err; }
245
+ }
246
+ finally {
247
+ if ((__b = this.asynchronous) === false || __b === nil) {
248
+ this.$run_after_hooks()
249
+ }};
250
+ if ((__b = this.asynchronous) !== false && __b !== nil) {
251
+ return nil
252
+ } else {
253
+ return this.$finish_running()
254
+ };
215
255
  };
216
256
 
217
- // line 17, opal-spec/example, Example#run_after_hooks
257
+ // line 38, opal-spec/example, Example#run_after_hooks
218
258
  Example_prototype.$run_after_hooks = function() {
219
- var __a, __b;
220
- return (__b = this.example_group.$after_hooks(), __b.$each._p = (__a = function(after) {
259
+ var e = nil, __a, __b;
260
+ return (function() { try {
261
+ (__b = this.example_group.$after_hooks(), __b.$each._p = (__a = function(after) {
221
262
 
222
263
  var __a;
223
264
  if (after == null) after = nil;
224
265
 
225
266
  return (__a = this, __a.$instance_eval._p = after.$to_proc(), __a.$instance_eval())
267
+ }, __a._s = this, __a), __b.$each())
268
+ } catch ($err) {
269
+ if (true) {
270
+ e = $err;this.exception = e}
271
+ else { throw $err; }
272
+ } }).call(this);
273
+ };
274
+
275
+ // line 48, opal-spec/example, Example#run_before_hooks
276
+ Example_prototype.$run_before_hooks = function() {
277
+ var __a, __b;
278
+ return (__b = this.example_group.$before_hooks(), __b.$each._p = (__a = function(before) {
279
+
280
+ var __a;
281
+ if (before == null) before = nil;
282
+
283
+ return (__a = this, __a.$instance_eval._p = before.$to_proc(), __a.$instance_eval())
226
284
  }, __a._s = this, __a), __b.$each());
227
285
  };
228
286
 
229
- // line 23, opal-spec/example, Example#run
230
- Example_prototype.$run = function(runner) {
231
- var e = nil, __a, __b;
287
+ // line 54, opal-spec/example, Example#run_async
288
+ Example_prototype.$run_async = TMP_1 = function() {
289
+ var e = nil, __context, block;
290
+ block = TMP_1._p || nil, __context = block._s, TMP_1._p = null;
291
+
232
292
  try {
233
- runner.$example_started(this);
234
- this.$run_before_hooks();
235
- (__a = this, __a.$instance_eval._p = this.__block__.$to_proc(), __a.$instance_eval());
293
+ block.$call()
236
294
  } catch ($err) {
237
295
  if (true) {
238
296
  e = $err;this.exception = e}
239
297
  else { throw $err; }
240
298
  }
241
299
  finally {
242
- try {
243
- this.$run_after_hooks()
244
- } catch ($err) {
245
- if (true) {
246
- e = $err;this.exception = e}
247
- else { throw $err; }
248
- }};
249
- if ((__b = this.exception) !== false && __b !== nil) {
250
- return runner.$example_failed(this)
251
- } else {
252
- return runner.$example_passed(this)
253
- };
300
+ this.$run_after_hooks()};
301
+ return this.$finish_running();
302
+ };
303
+
304
+ // line 66, opal-spec/example, Example#set_timeout
305
+ Example_prototype.$set_timeout = TMP_2 = function(duration) {
306
+ var __context, block;
307
+ block = TMP_2._p || nil, __context = block._s, TMP_2._p = null;
308
+
309
+
310
+ setTimeout(function() {
311
+ block.$call();
312
+ }, duration);
313
+
314
+ return this;
254
315
  };
255
- ;Example._donate(["$description", "$example_group", "$exception", "$initialize", "$run_before_hooks", "$run_after_hooks", "$run"]);
256
- })(Spec, null)
316
+
317
+ })(OpalSpec, null)
257
318
 
258
319
  })(self)
259
320
  })();
260
321
  // lib/opal-spec/example_group.rb
261
322
  (function() {
262
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module, __klass = __opal.klass;
323
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __module = __opal.module, __klass = __opal.klass;
263
324
 
264
325
  return (function(__base){
265
- // line 1, opal-spec/example_group, module Spec
266
- function Spec() {};
267
- Spec = __module(__base, "Spec", Spec);
268
- var Spec_prototype = Spec.prototype, __scope = Spec._scope;
326
+ // line 1, opal-spec/example_group, module OpalSpec
327
+ function OpalSpec() {};
328
+ OpalSpec = __module(__base, "OpalSpec", OpalSpec);
329
+ var OpalSpec_prototype = OpalSpec.prototype, __scope = OpalSpec._scope;
269
330
 
270
331
  (function(__base, __super){
271
332
  // line 2, opal-spec/example_group, class ExampleGroup
272
333
  function ExampleGroup() {};
273
334
  ExampleGroup = __klass(__base, __super, "ExampleGroup", ExampleGroup);
274
- var ExampleGroup_prototype = ExampleGroup.prototype, __scope = ExampleGroup._scope, TMP_1, TMP_2, TMP_3;
275
- ExampleGroup_prototype.examples = ExampleGroup_prototype.before_hooks = ExampleGroup_prototype.after_hooks = ExampleGroup_prototype.parent = ExampleGroup_prototype.desc = nil;
335
+ var ExampleGroup_prototype = ExampleGroup.prototype, __scope = ExampleGroup._scope, TMP_1, TMP_2, TMP_3, TMP_4;
336
+ ExampleGroup_prototype.examples = ExampleGroup_prototype.before_hooks = ExampleGroup_prototype.after_hooks = ExampleGroup_prototype.parent = ExampleGroup_prototype.runner = ExampleGroup_prototype.running_examples = ExampleGroup_prototype.desc = nil;
276
337
 
277
338
  ExampleGroup.example_groups = [];
278
339
 
@@ -292,7 +353,7 @@
292
353
  if (this.stack == null) this.stack = nil;
293
354
  if (this.example_groups == null) this.example_groups = nil;
294
355
 
295
- group = this['$new'](desc, this.stack.$last());
356
+ group = this.$new(desc, this.stack.$last());
296
357
  this.example_groups['$<<'](group);
297
358
  this.stack['$<<'](group);
298
359
  (__a = group, __a.$instance_eval._p = block.$to_proc(), __a.$instance_eval());
@@ -314,19 +375,29 @@
314
375
  var __context, block;
315
376
  block = TMP_1._p || nil, __context = block._s, TMP_1._p = null;
316
377
 
317
- return this.examples['$<<'](__scope.Example['$new'](this, desc, block));
378
+ return this.examples['$<<'](__scope.Example.$new(this, desc, block));
379
+ };
380
+
381
+ // line 31, opal-spec/example_group, ExampleGroup#async
382
+ ExampleGroup_prototype.$async = TMP_2 = function(desc) {
383
+ var example = nil, __context, block;
384
+ block = TMP_2._p || nil, __context = block._s, TMP_2._p = null;
385
+
386
+ example = __scope.Example.$new(this, desc, block);
387
+ example['$asynchronous='](true);
388
+ return this.examples['$<<'](example);
318
389
  };
319
390
 
320
- // line 31, opal-spec/example_group, ExampleGroup#it_behaves_like
391
+ // line 37, opal-spec/example_group, ExampleGroup#it_behaves_like
321
392
  ExampleGroup_prototype.$it_behaves_like = function(objs) {
322
393
  objs = __slice.call(arguments, 0);
323
394
  return nil;
324
395
  };
325
396
 
326
- // line 34, opal-spec/example_group, ExampleGroup#before
327
- ExampleGroup_prototype.$before = TMP_2 = function(type) {
397
+ // line 40, opal-spec/example_group, ExampleGroup#before
398
+ ExampleGroup_prototype.$before = TMP_3 = function(type) {
328
399
  var __a, __context, block;
329
- block = TMP_2._p || nil, __context = block._s, TMP_2._p = null;
400
+ block = TMP_3._p || nil, __context = block._s, TMP_3._p = null;
330
401
  if (type == null) {
331
402
  type = "each"
332
403
  }
@@ -336,10 +407,10 @@
336
407
  return this.before_hooks['$<<'](block);
337
408
  };
338
409
 
339
- // line 39, opal-spec/example_group, ExampleGroup#after
340
- ExampleGroup_prototype.$after = TMP_3 = function(type) {
410
+ // line 45, opal-spec/example_group, ExampleGroup#after
411
+ ExampleGroup_prototype.$after = TMP_4 = function(type) {
341
412
  var __a, __context, block;
342
- block = TMP_3._p || nil, __context = block._s, TMP_3._p = null;
413
+ block = TMP_4._p || nil, __context = block._s, TMP_4._p = null;
343
414
  if (type == null) {
344
415
  type = "each"
345
416
  }
@@ -349,7 +420,7 @@
349
420
  return this.after_hooks['$<<'](block);
350
421
  };
351
422
 
352
- // line 44, opal-spec/example_group, ExampleGroup#before_hooks
423
+ // line 50, opal-spec/example_group, ExampleGroup#before_hooks
353
424
  ExampleGroup_prototype.$before_hooks = function() {
354
425
  var __a;
355
426
  if ((__a = this.parent) !== false && __a !== nil) {
@@ -359,7 +430,7 @@
359
430
  };
360
431
  };
361
432
 
362
- // line 48, opal-spec/example_group, ExampleGroup#after_hooks
433
+ // line 54, opal-spec/example_group, ExampleGroup#after_hooks
363
434
  ExampleGroup_prototype.$after_hooks = function() {
364
435
  var __a;
365
436
  if ((__a = this.parent) !== false && __a !== nil) {
@@ -369,21 +440,46 @@
369
440
  };
370
441
  };
371
442
 
372
- // line 52, opal-spec/example_group, ExampleGroup#run
443
+ // line 58, opal-spec/example_group, ExampleGroup#run
373
444
  ExampleGroup_prototype.$run = function(runner) {
374
- var __a, __b;
375
- runner.$example_group_started(this);
376
- (__b = this.examples, __b.$each._p = (__a = function(example) {
445
+
446
+ this.runner = runner;
447
+ this.runner.$example_group_started(this);
448
+ this.running_examples = this.examples.$dup();
449
+ return this.$run_next_example();
450
+ };
377
451
 
378
-
379
- if (example == null) example = nil;
452
+ // line 66, opal-spec/example_group, ExampleGroup#run_next_example
453
+ ExampleGroup_prototype.$run_next_example = function() {
454
+ var __a;
455
+ if ((__a = this.running_examples['$empty?']()) !== false && __a !== nil) {
456
+ return this.runner.$example_group_finished(this)
457
+ } else {
458
+ return this.running_examples.$shift().$run()
459
+ };
460
+ };
380
461
 
381
- return example.$run(runner)
382
- }, __a._s = this, __a), __b.$each());
383
- return runner.$example_group_finished(this);
462
+ // line 74, opal-spec/example_group, ExampleGroup#example_started
463
+ ExampleGroup_prototype.$example_started = function(example) {
464
+
465
+ return this.runner.$example_started(example);
466
+ };
467
+
468
+ // line 78, opal-spec/example_group, ExampleGroup#example_passed
469
+ ExampleGroup_prototype.$example_passed = function(example) {
470
+
471
+ this.runner.$example_passed(example);
472
+ return this.$run_next_example();
384
473
  };
385
474
 
386
- // line 58, opal-spec/example_group, ExampleGroup#description
475
+ // line 83, opal-spec/example_group, ExampleGroup#example_failed
476
+ ExampleGroup_prototype.$example_failed = function(example) {
477
+
478
+ this.runner.$example_failed(example);
479
+ return this.$run_next_example();
480
+ };
481
+
482
+ // line 88, opal-spec/example_group, ExampleGroup#description
387
483
  ExampleGroup_prototype.$description = function() {
388
484
  var __a;
389
485
  if ((__a = this.parent) !== false && __a !== nil) {
@@ -392,20 +488,20 @@
392
488
  return this.desc
393
489
  };
394
490
  };
395
- ;ExampleGroup._donate(["$initialize", "$it", "$it_behaves_like", "$before", "$after", "$before_hooks", "$after_hooks", "$run", "$description"]); ;ExampleGroup._sdonate(["$example_groups", "$create"]);
396
- })(Spec, null)
491
+ ;ExampleGroup._sdonate(["$example_groups", "$create"]);
492
+ })(OpalSpec, null)
397
493
 
398
494
  })(self)
399
495
  })();
400
496
  // lib/opal-spec/expectations.rb
401
497
  (function() {
402
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module, __klass = __opal.klass;
498
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __module = __opal.module, __klass = __opal.klass;
403
499
 
404
500
  (function(__base){
405
- // line 1, opal-spec/expectations, module Spec
406
- function Spec() {};
407
- Spec = __module(__base, "Spec", Spec);
408
- var Spec_prototype = Spec.prototype, __scope = Spec._scope;
501
+ // line 1, opal-spec/expectations, module OpalSpec
502
+ function OpalSpec() {};
503
+ OpalSpec = __module(__base, "OpalSpec", OpalSpec);
504
+ var OpalSpec_prototype = OpalSpec.prototype, __scope = OpalSpec._scope;
409
505
 
410
506
  (function(__base, __super){
411
507
  // line 2, opal-spec/expectations, class ExpectationNotMetError
@@ -415,7 +511,7 @@
415
511
 
416
512
  nil
417
513
 
418
- })(Spec, __scope.StandardError);
514
+ })(OpalSpec, __scope.StandardError);
419
515
 
420
516
  (function(__base){
421
517
  // line 4, opal-spec/expectations, module Expectations
@@ -431,7 +527,7 @@
431
527
  if (matcher !== false && matcher !== nil) {
432
528
  return matcher.$match(this)
433
529
  } else {
434
- return (__scope.Spec)._scope.PositiveOperatorMatcher['$new'](this)
530
+ return (__scope.OpalSpec)._scope.PositiveOperatorMatcher.$new(this)
435
531
  };
436
532
  };
437
533
 
@@ -443,47 +539,47 @@
443
539
  if (matcher !== false && matcher !== nil) {
444
540
  return matcher.$not_match(this)
445
541
  } else {
446
- return (__scope.Spec)._scope.NegativeOperatorMatcher['$new'](this)
542
+ return (__scope.OpalSpec)._scope.NegativeOperatorMatcher.$new(this)
447
543
  };
448
544
  };
449
545
 
450
546
  // line 21, opal-spec/expectations, Expectations#be_kind_of
451
547
  Expectations_prototype.$be_kind_of = function(expected) {
452
548
 
453
- return (__scope.Spec)._scope.BeKindOfMatcher['$new'](expected);
549
+ return (__scope.OpalSpec)._scope.BeKindOfMatcher.$new(expected);
454
550
  };
455
551
 
456
552
  // line 25, opal-spec/expectations, Expectations#be_nil
457
553
  Expectations_prototype.$be_nil = function() {
458
554
 
459
- return (__scope.Spec)._scope.BeNilMatcher['$new'](nil);
555
+ return (__scope.OpalSpec)._scope.BeNilMatcher.$new(nil);
460
556
  };
461
557
 
462
558
  // line 29, opal-spec/expectations, Expectations#be_true
463
559
  Expectations_prototype.$be_true = function() {
464
560
 
465
- return (__scope.Spec)._scope.BeTrueMatcher['$new'](true);
561
+ return (__scope.OpalSpec)._scope.BeTrueMatcher.$new(true);
466
562
  };
467
563
 
468
564
  // line 33, opal-spec/expectations, Expectations#be_false
469
565
  Expectations_prototype.$be_false = function() {
470
566
 
471
- return (__scope.Spec)._scope.BeFalseMatcher['$new'](false);
567
+ return (__scope.OpalSpec)._scope.BeFalseMatcher.$new(false);
472
568
  };
473
569
 
474
570
  // line 37, opal-spec/expectations, Expectations#equal
475
571
  Expectations_prototype.$equal = function(expected) {
476
572
 
477
- return (__scope.Spec)._scope.EqualMatcher['$new'](expected);
573
+ return (__scope.OpalSpec)._scope.EqualMatcher.$new(expected);
478
574
  };
479
575
 
480
576
  // line 41, opal-spec/expectations, Expectations#raise_error
481
577
  Expectations_prototype.$raise_error = function(expected) {
482
578
 
483
- return (__scope.Spec)._scope.RaiseErrorMatcher['$new'](expected);
579
+ return (__scope.OpalSpec)._scope.RaiseErrorMatcher.$new(expected);
484
580
  };
485
581
  ;Expectations._donate(["$should", "$should_not", "$be_kind_of", "$be_nil", "$be_true", "$be_false", "$equal", "$raise_error"]);
486
- })(Spec);
582
+ })(OpalSpec);
487
583
 
488
584
  })(self);
489
585
  return (function(__base, __super){
@@ -492,13 +588,13 @@
492
588
  Object = __klass(__base, __super, "Object", Object);
493
589
  var Object_prototype = Object.prototype, __scope = Object._scope;
494
590
 
495
- Object.$include((__scope.Spec)._scope.Expectations)
591
+ Object.$include((__scope.OpalSpec)._scope.Expectations)
496
592
 
497
593
  })(self, null);
498
594
  })();
499
595
  // lib/opal-spec/kernel.rb
500
596
  (function() {
501
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module;
597
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __module = __opal.module;
502
598
 
503
599
  return (function(__base){
504
600
  // line 1, opal-spec/kernel, module Kernel
@@ -511,26 +607,26 @@
511
607
  var __context, block;
512
608
  block = TMP_1._p || nil, __context = block._s, TMP_1._p = null;
513
609
 
514
- return (__scope.Spec)._scope.ExampleGroup.$create(desc, block);
610
+ return (__scope.OpalSpec)._scope.ExampleGroup.$create(desc, block);
515
611
  };
516
612
 
517
613
  // line 6, opal-spec/kernel, Kernel#mock
518
614
  Kernel_prototype.$mock = function(obj) {
519
615
 
520
- return __scope.Object['$new']();
616
+ return __scope.Object.$new();
521
617
  };
522
618
  ;Kernel._donate(["$describe", "$mock"]);
523
619
  })(self)
524
620
  })();
525
621
  // lib/opal-spec/matchers.rb
526
622
  (function() {
527
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module, __klass = __opal.klass;
623
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __module = __opal.module, __klass = __opal.klass;
528
624
 
529
625
  return (function(__base){
530
- // line 1, opal-spec/matchers, module Spec
531
- function Spec() {};
532
- Spec = __module(__base, "Spec", Spec);
533
- var Spec_prototype = Spec.prototype, __scope = Spec._scope;
626
+ // line 1, opal-spec/matchers, module OpalSpec
627
+ function OpalSpec() {};
628
+ OpalSpec = __module(__base, "OpalSpec", OpalSpec);
629
+ var OpalSpec_prototype = OpalSpec.prototype, __scope = OpalSpec._scope;
534
630
 
535
631
  (function(__base, __super){
536
632
  // line 2, opal-spec/matchers, class Matcher
@@ -547,10 +643,10 @@
547
643
  // line 7, opal-spec/matchers, Matcher#failure
548
644
  Matcher_prototype.$failure = function(message) {
549
645
 
550
- return this.$raise((__scope.Spec)._scope.ExpectationNotMetError, message);
646
+ return this.$raise((__scope.OpalSpec)._scope.ExpectationNotMetError, message);
551
647
  };
552
- ;Matcher._donate(["$initialize", "$failure"]);
553
- })(Spec, null);
648
+
649
+ })(OpalSpec, null);
554
650
 
555
651
  (function(__base, __super){
556
652
  // line 12, opal-spec/matchers, class PositiveOperatorMatcher
@@ -568,8 +664,8 @@
568
664
  return this.$failure("expected: " + (expected.$inspect()) + ", got: " + (this.actual.$inspect()) + " (using ==).")
569
665
  };
570
666
  }
571
- ;PositiveOperatorMatcher._donate(["$=="]);
572
- })(Spec, __scope.Matcher);
667
+
668
+ })(OpalSpec, __scope.Matcher);
573
669
 
574
670
  (function(__base, __super){
575
671
  // line 22, opal-spec/matchers, class NegativeOperatorMatcher
@@ -587,8 +683,8 @@
587
683
  return nil
588
684
  };
589
685
  }
590
- ;NegativeOperatorMatcher._donate(["$=="]);
591
- })(Spec, __scope.Matcher);
686
+
687
+ })(OpalSpec, __scope.Matcher);
592
688
 
593
689
  (function(__base, __super){
594
690
  // line 30, opal-spec/matchers, class BeKindOfMatcher
@@ -603,11 +699,11 @@
603
699
  if ((__a = expected['$kind_of?'](this.actual)) !== false && __a !== nil) {
604
700
  return nil
605
701
  } else {
606
- return this.$failure("expected " + (expected.$inspect()) + " to be a kind of " + (this.actual) + ", not " + (expected['$class']()) + ".")
702
+ return this.$failure("expected " + (expected.$inspect()) + " to be a kind of " + (this.actual) + ", not " + (expected.$class()) + ".")
607
703
  };
608
704
  }
609
- ;BeKindOfMatcher._donate(["$match"]);
610
- })(Spec, __scope.Matcher);
705
+
706
+ })(OpalSpec, __scope.Matcher);
611
707
 
612
708
  (function(__base, __super){
613
709
  // line 38, opal-spec/matchers, class BeNilMatcher
@@ -624,8 +720,8 @@
624
720
  return this.$failure("expected " + (expected.$inspect()) + " to be nil.")
625
721
  };
626
722
  }
627
- ;BeNilMatcher._donate(["$match"]);
628
- })(Spec, __scope.Matcher);
723
+
724
+ })(OpalSpec, __scope.Matcher);
629
725
 
630
726
  (function(__base, __super){
631
727
  // line 46, opal-spec/matchers, class BeTrueMatcher
@@ -642,8 +738,8 @@
642
738
  return this.$failure("expected " + (expected.$inspect()) + " to be true.")
643
739
  };
644
740
  }
645
- ;BeTrueMatcher._donate(["$match"]);
646
- })(Spec, __scope.Matcher);
741
+
742
+ })(OpalSpec, __scope.Matcher);
647
743
 
648
744
  (function(__base, __super){
649
745
  // line 54, opal-spec/matchers, class BeFalseMatcher
@@ -660,8 +756,8 @@
660
756
  return this.$failure("expected " + (expected.$inspect()) + " to be false.")
661
757
  };
662
758
  }
663
- ;BeFalseMatcher._donate(["$match"]);
664
- })(Spec, __scope.Matcher);
759
+
760
+ })(OpalSpec, __scope.Matcher);
665
761
 
666
762
  (function(__base, __super){
667
763
  // line 62, opal-spec/matchers, class EqualMatcher
@@ -689,8 +785,8 @@
689
785
  return nil
690
786
  };
691
787
  };
692
- ;EqualMatcher._donate(["$match", "$not_match"]);
693
- })(Spec, __scope.Matcher);
788
+
789
+ })(OpalSpec, __scope.Matcher);
694
790
 
695
791
  (function(__base, __super){
696
792
  // line 76, opal-spec/matchers, class RaiseErrorMatcher
@@ -717,20 +813,20 @@
717
813
  return nil
718
814
  };
719
815
  }
720
- ;RaiseErrorMatcher._donate(["$match"]);
721
- })(Spec, __scope.Matcher);
816
+
817
+ })(OpalSpec, __scope.Matcher);
722
818
 
723
819
  })(self)
724
820
  })();
725
821
  // lib/opal-spec/phantom_formatter.rb
726
822
  (function() {
727
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module, __klass = __opal.klass;
823
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __module = __opal.module, __klass = __opal.klass;
728
824
 
729
825
  return (function(__base){
730
- // line 1, opal-spec/phantom_formatter, module Spec
731
- function Spec() {};
732
- Spec = __module(__base, "Spec", Spec);
733
- var Spec_prototype = Spec.prototype, __scope = Spec._scope;
826
+ // line 1, opal-spec/phantom_formatter, module OpalSpec
827
+ function OpalSpec() {};
828
+ OpalSpec = __module(__base, "OpalSpec", OpalSpec);
829
+ var OpalSpec_prototype = OpalSpec.prototype, __scope = OpalSpec._scope;
734
830
 
735
831
  (function(__base, __super){
736
832
  // line 2, opal-spec/phantom_formatter, class PhantomFormatter
@@ -776,7 +872,7 @@
776
872
  if ((__a = this.failed_examples['$empty?']()) !== false && __a !== nil) {
777
873
  this.$log("\nFinished");
778
874
  this.$log_green("" + (this.$example_count()) + " examples, 0 failures");
779
- return phantom.exit(0);
875
+ return this.$finish_with_code(0);
780
876
  } else {
781
877
  this.$log("\nFailures:");
782
878
  (__b = this.failed_examples, __b.$each_with_index._p = (__a = function(example, idx) {
@@ -787,20 +883,33 @@ if (idx == null) idx = nil;
787
883
 
788
884
  this.$log("\n " + ((__a = idx, __b = 1, typeof(__a) === 'number' ? __a + __b : __a['$+'](__b))) + ". " + (example.$example_group().$description()) + " " + (example.$description()));
789
885
  exception = example.$exception();
790
- $case = exception;if ((__scope.Spec)._scope.ExpectationNotMetError['$===']($case)) {
886
+ $case = exception;if ((__scope.OpalSpec)._scope.ExpectationNotMetError['$===']($case)) {
791
887
  output = exception.$message()
792
888
  }
793
- else {output = "" + (exception['$class']()) + ": " + (exception.$message()) + "\n";
889
+ else {output = "" + (exception.$class().$name()) + ": " + (exception.$message()) + "\n";
794
890
  output = output['$+'](" " + (exception.$backtrace().$join("\n ")) + "\n");};
795
891
  return this.$log_red(" " + (output));
796
892
  }, __a._s = this, __a), __b.$each_with_index());
797
893
  this.$log("\nFinished");
798
894
  this.$log_red("" + (this.$example_count()) + " examples, " + (this.failed_examples.$size()) + " failures");
799
- return phantom.exit(1);
895
+ return this.$finish_with_code(1);
800
896
  };
801
897
  };
802
898
 
803
- // line 57, opal-spec/phantom_formatter, PhantomFormatter#example_group_started
899
+ // line 57, opal-spec/phantom_formatter, PhantomFormatter#finish_with_code
900
+ PhantomFormatter_prototype.$finish_with_code = function(code) {
901
+
902
+
903
+ if (typeof(phantom) !== 'undefined') {
904
+ return phantom.exit(code);
905
+ }
906
+ else {
907
+ window.OPAL_SPEC_CODE = code;
908
+ }
909
+
910
+ };
911
+
912
+ // line 68, opal-spec/phantom_formatter, PhantomFormatter#example_group_started
804
913
  PhantomFormatter_prototype.$example_group_started = function(group) {
805
914
 
806
915
  this.example_group = group;
@@ -808,20 +917,20 @@ if (idx == null) idx = nil;
808
917
  return this.$log("\n" + (group.$description()));
809
918
  };
810
919
 
811
- // line 64, opal-spec/phantom_formatter, PhantomFormatter#example_group_finished
920
+ // line 75, opal-spec/phantom_formatter, PhantomFormatter#example_group_finished
812
921
  PhantomFormatter_prototype.$example_group_finished = function(group) {
813
922
 
814
923
  return nil;
815
924
  };
816
925
 
817
- // line 67, opal-spec/phantom_formatter, PhantomFormatter#example_started
926
+ // line 78, opal-spec/phantom_formatter, PhantomFormatter#example_started
818
927
  PhantomFormatter_prototype.$example_started = function(example) {
819
928
 
820
929
  this.examples['$<<'](example);
821
930
  return this.example = example;
822
931
  };
823
932
 
824
- // line 72, opal-spec/phantom_formatter, PhantomFormatter#example_failed
933
+ // line 83, opal-spec/phantom_formatter, PhantomFormatter#example_failed
825
934
  PhantomFormatter_prototype.$example_failed = function(example) {
826
935
 
827
936
  this.failed_examples['$<<'](example);
@@ -829,120 +938,38 @@ if (idx == null) idx = nil;
829
938
  return this.$log_red(" " + (example.$description()));
830
939
  };
831
940
 
832
- // line 78, opal-spec/phantom_formatter, PhantomFormatter#example_passed
941
+ // line 89, opal-spec/phantom_formatter, PhantomFormatter#example_passed
833
942
  PhantomFormatter_prototype.$example_passed = function(example) {
834
943
 
835
944
  return this.$log_green(" " + (example.$description()));
836
945
  };
837
946
 
838
- // line 82, opal-spec/phantom_formatter, PhantomFormatter#example_count
947
+ // line 93, opal-spec/phantom_formatter, PhantomFormatter#example_count
839
948
  PhantomFormatter_prototype.$example_count = function() {
840
949
 
841
950
  return this.examples.$size();
842
951
  };
843
- ;PhantomFormatter._donate(["$initialize", "$log_green", "$log_red", "$log", "$start", "$finish", "$example_group_started", "$example_group_finished", "$example_started", "$example_failed", "$example_passed", "$example_count"]);
844
- })(Spec, null)
845
-
846
- })(self)
847
- })();
848
- // lib/opal-spec/rspec_formatter.rb
849
- (function() {
850
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module, __klass = __opal.klass;
851
-
852
- return (function(__base){
853
- // line 1, opal-spec/rspec_formatter, module Spec
854
- function Spec() {};
855
- Spec = __module(__base, "Spec", Spec);
856
- var Spec_prototype = Spec.prototype, __scope = Spec._scope;
857
-
858
- (function(__base, __super){
859
- // line 2, opal-spec/rspec_formatter, class RSpecFormatter
860
- function RSpecFormatter() {};
861
- RSpecFormatter = __klass(__base, __super, "RSpecFormatter", RSpecFormatter);
862
- var RSpecFormatter_prototype = RSpecFormatter.prototype, __scope = RSpecFormatter._scope;
863
- RSpecFormatter_prototype.spec_collector = RSpecFormatter_prototype.example_group = RSpecFormatter_prototype.examples = RSpecFormatter_prototype.failed_examples = nil;
864
-
865
- // line 3, opal-spec/rspec_formatter, RSpecFormatter#initialize
866
- RSpecFormatter_prototype.$initialize = function() {
867
-
868
- this.examples = [];
869
- this.failed_examples = [];
870
- return this.spec_collector = spec_collector;
871
- };
872
952
 
873
- // line 10, opal-spec/rspec_formatter, RSpecFormatter#start
874
- RSpecFormatter_prototype.$start = function() {
875
-
876
- return nil;
877
- };
878
-
879
- // line 13, opal-spec/rspec_formatter, RSpecFormatter#finish
880
- RSpecFormatter_prototype.$finish = function() {
881
-
882
- return nil;
883
- };
884
-
885
- // line 16, opal-spec/rspec_formatter, RSpecFormatter#example_group_started
886
- RSpecFormatter_prototype.$example_group_started = function(group) {
887
-
888
- this.example_group = group;
889
- this.example_group_failed = false;
890
- return this.spec_collector.example_group_started(group.$description());
891
- };
892
-
893
- // line 23, opal-spec/rspec_formatter, RSpecFormatter#example_group_finished
894
- RSpecFormatter_prototype.$example_group_finished = function(group) {
895
-
896
- return this.spec_collector.example_group_finished(this.example_group.$description());
897
- };
898
-
899
- // line 27, opal-spec/rspec_formatter, RSpecFormatter#example_started
900
- RSpecFormatter_prototype.$example_started = function(example) {
901
-
902
- this.examples['$<<'](example);
903
- return this.example = example;
904
- };
905
-
906
- // line 32, opal-spec/rspec_formatter, RSpecFormatter#example_failed
907
- RSpecFormatter_prototype.$example_failed = function(example) {
908
-
909
- this.failed_examples['$<<'](example);
910
- this.example_group_failed = true;
911
- return this.spec_collector.example_failed(example.$description(), example.$exception().$message());
912
- };
913
-
914
- // line 38, opal-spec/rspec_formatter, RSpecFormatter#example_passed
915
- RSpecFormatter_prototype.$example_passed = function(example) {
916
-
917
- return this.spec_collector.example_passed(example.$description());
918
- };
919
-
920
- // line 42, opal-spec/rspec_formatter, RSpecFormatter#example_count
921
- RSpecFormatter_prototype.$example_count = function() {
922
-
923
- return this.examples.$size();
924
- };
925
- ;RSpecFormatter._donate(["$initialize", "$start", "$finish", "$example_group_started", "$example_group_finished", "$example_started", "$example_failed", "$example_passed", "$example_count"]);
926
- })(Spec, null)
953
+ })(OpalSpec, null)
927
954
 
928
955
  })(self)
929
956
  })();
930
957
  // lib/opal-spec/runner.rb
931
958
  (function() {
932
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module, __klass = __opal.klass;
959
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __module = __opal.module, __klass = __opal.klass;
933
960
 
934
961
  return (function(__base){
935
- // line 1, opal-spec/runner, module Spec
936
- function Spec() {};
937
- Spec = __module(__base, "Spec", Spec);
938
- var Spec_prototype = Spec.prototype, __scope = Spec._scope;
962
+ // line 1, opal-spec/runner, module OpalSpec
963
+ function OpalSpec() {};
964
+ OpalSpec = __module(__base, "OpalSpec", OpalSpec);
965
+ var OpalSpec_prototype = OpalSpec.prototype, __scope = OpalSpec._scope;
939
966
 
940
967
  (function(__base, __super){
941
968
  // line 2, opal-spec/runner, class Runner
942
969
  function Runner() {};
943
970
  Runner = __klass(__base, __super, "Runner", Runner);
944
971
  var Runner_prototype = Runner.prototype, __scope = Runner._scope;
945
- Runner_prototype.formatter = nil;
972
+ Runner_prototype.formatter = Runner_prototype.groups = nil;
946
973
 
947
974
  // line 3, opal-spec/runner, Runner.in_browser?
948
975
  Runner['$in_browser?'] = function() {
@@ -960,7 +987,7 @@ if (idx == null) idx = nil;
960
987
  Runner['$in_phantom?'] = function() {
961
988
 
962
989
 
963
- if (typeof(phantom) !== 'undefined' && phantom.exit) {
990
+ if (typeof(phantom) !== 'undefined' || typeof(OPAL_SPEC_PHANTOM) !== 'undefined') {
964
991
  return true;
965
992
  }
966
993
 
@@ -974,11 +1001,11 @@ if (idx == null) idx = nil;
974
1001
  if ((__a = this['$in_browser?']()) !== false && __a !== nil) {
975
1002
 
976
1003
  setTimeout(function() {
977
- __scope.Runner['$new']().$run();
1004
+ __scope.Runner.$new().$run();
978
1005
  }, 0);
979
1006
 
980
1007
  } else {
981
- return __scope.Runner['$new']().$run()
1008
+ return __scope.Runner.$new().$run()
982
1009
  }
983
1010
  };
984
1011
 
@@ -986,68 +1013,72 @@ if (idx == null) idx = nil;
986
1013
  Runner_prototype.$initialize = function() {
987
1014
  var __a;
988
1015
  if ((__a = __scope.Runner['$in_phantom?']()) !== false && __a !== nil) {
989
- return this.formatter = __scope.PhantomFormatter['$new']()
1016
+ return this.formatter = __scope.PhantomFormatter.$new()
990
1017
  } else {
991
1018
  if ((__a = __scope.Runner['$in_browser?']()) !== false && __a !== nil) {
992
- return this.formatter = __scope.BrowserFormatter['$new']()
1019
+ return this.formatter = __scope.BrowserFormatter.$new()
993
1020
  } else {
994
- return this.formatter = __scope.RSpecFormatter['$new']()
1021
+ return nil
995
1022
  }
996
1023
  };
997
1024
  };
998
1025
 
999
- // line 45, opal-spec/runner, Runner#run
1026
+ // line 43, opal-spec/runner, Runner#run
1000
1027
  Runner_prototype.$run = function() {
1001
- var groups = nil, __a, __b;
1002
- groups = __scope.ExampleGroup.$example_groups();
1028
+
1029
+ this.groups = __scope.ExampleGroup.$example_groups().$dup();
1003
1030
  this.formatter.$start();
1004
- (__b = groups, __b.$each._p = (__a = function(group) {
1005
-
1006
-
1007
- if (group == null) group = nil;
1031
+ return this.$run_next_group();
1032
+ };
1008
1033
 
1009
- return group.$run(this)
1010
- }, __a._s = this, __a), __b.$each());
1011
- return this.formatter.$finish();
1034
+ // line 49, opal-spec/runner, Runner#run_next_group
1035
+ Runner_prototype.$run_next_group = function() {
1036
+ var __a;
1037
+ if ((__a = this.groups['$empty?']()) !== false && __a !== nil) {
1038
+ return this.formatter.$finish()
1039
+ } else {
1040
+ return this.groups.$shift().$run(this)
1041
+ };
1012
1042
  };
1013
1043
 
1014
- // line 52, opal-spec/runner, Runner#example_group_started
1044
+ // line 57, opal-spec/runner, Runner#example_group_started
1015
1045
  Runner_prototype.$example_group_started = function(group) {
1016
1046
 
1017
1047
  return this.formatter.$example_group_started(group);
1018
1048
  };
1019
1049
 
1020
- // line 56, opal-spec/runner, Runner#example_group_finished
1050
+ // line 61, opal-spec/runner, Runner#example_group_finished
1021
1051
  Runner_prototype.$example_group_finished = function(group) {
1022
1052
 
1023
- return this.formatter.$example_group_finished(group);
1053
+ this.formatter.$example_group_finished(group);
1054
+ return this.$run_next_group();
1024
1055
  };
1025
1056
 
1026
- // line 60, opal-spec/runner, Runner#example_started
1057
+ // line 66, opal-spec/runner, Runner#example_started
1027
1058
  Runner_prototype.$example_started = function(example) {
1028
1059
 
1029
1060
  return this.formatter.$example_started(example);
1030
1061
  };
1031
1062
 
1032
- // line 64, opal-spec/runner, Runner#example_passed
1063
+ // line 70, opal-spec/runner, Runner#example_passed
1033
1064
  Runner_prototype.$example_passed = function(example) {
1034
1065
 
1035
1066
  return this.formatter.$example_passed(example);
1036
1067
  };
1037
1068
 
1038
- // line 68, opal-spec/runner, Runner#example_failed
1069
+ // line 74, opal-spec/runner, Runner#example_failed
1039
1070
  Runner_prototype.$example_failed = function(example) {
1040
1071
 
1041
1072
  return this.formatter.$example_failed(example);
1042
1073
  };
1043
- ;Runner._donate(["$initialize", "$run", "$example_group_started", "$example_group_finished", "$example_started", "$example_passed", "$example_failed"]); ;Runner._sdonate(["$in_browser?", "$in_phantom?", "$autorun"]);
1044
- })(Spec, null)
1074
+ ;Runner._sdonate(["$in_browser?", "$in_phantom?", "$autorun"]);
1075
+ })(OpalSpec, null)
1045
1076
 
1046
1077
  })(self)
1047
1078
  })();
1048
1079
  // lib/opal-spec/scratch_pad.rb
1049
1080
  (function() {
1050
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module;
1081
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __module = __opal.module;
1051
1082
 
1052
1083
  return (function(__base){
1053
1084
  // line 1, opal-spec/scratch_pad, module ScratchPad
@@ -1087,21 +1118,21 @@ if (idx == null) idx = nil;
1087
1118
  })();
1088
1119
  // lib/opal-spec/version.rb
1089
1120
  (function() {
1090
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm, __module = __opal.module;
1121
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __module = __opal.module;
1091
1122
 
1092
1123
  return (function(__base){
1093
- // line 1, opal-spec/version, module Spec
1094
- function Spec() {};
1095
- Spec = __module(__base, "Spec", Spec);
1096
- var Spec_prototype = Spec.prototype, __scope = Spec._scope;
1124
+ // line 1, opal-spec/version, module OpalSpec
1125
+ function OpalSpec() {};
1126
+ OpalSpec = __module(__base, "OpalSpec", OpalSpec);
1127
+ var OpalSpec_prototype = OpalSpec.prototype, __scope = OpalSpec._scope;
1097
1128
 
1098
- __scope.VERSION = "0.1.15"
1129
+ __scope.VERSION = "0.2.1"
1099
1130
 
1100
1131
  })(self)
1101
1132
  })();
1102
1133
  // lib/opal-spec.rb
1103
1134
  (function() {
1104
- var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __mm = __opal.mm;
1135
+ var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice;
1105
1136
 
1106
1137
  //= require opal-spec/example;
1107
1138
  //= require opal-spec/example_group;