Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

I think I got the race condition figured out.

  • Loading branch information...
commit 85a8add1e6834c2e6831c77f7bc8104c3041c14e 1 parent 23c7d96
Brian Takita btakita authored

Showing 1 changed file with 13 additions and 13 deletions. Show diff stats Hide diff stats

  1. +13 13 lib/screw.builder.js
26 lib/screw.builder.js
... ... @@ -1,18 +1,18 @@
1 1 var Screw = {
2 2 Unit: function(suite) {
3   - if(!Screw.root_element) {
4   - Screw.root_element = $('<div class="describe">');
5   - Screw.root_element
6   - .append($('<h3 class="status">'))
7   - .append('<ol class="befores">')
8   - .append('<ul class="its">')
9   - .append('<ul class="describes">')
10   - .append('<ol class="afters">')
11   - Screw.Specifications.context.push(Screw.root_element);
12   - }
13   -
14 3 Screw.last_suite = suite;
15   - Screw.root_element.ready(function() {
  4 + $("html").ready(function() {
  5 + if(!Screw.root_element) {
  6 + Screw.root_element = $('<div class="describe">');
  7 + Screw.root_element
  8 + .append($('<h3 class="status">'))
  9 + .append('<ol class="befores">')
  10 + .append('<ul class="its">')
  11 + .append('<ul class="describes">')
  12 + .append('<ol class="afters">')
  13 + Screw.Specifications.context.push(Screw.root_element);
  14 + }
  15 +
16 16 $(function() {
17 17 $('body').append(Screw.root_element);
18 18 var contents = suite.toString().match(/^[^\{]*{((.*\n*)*)}/m)[1];
@@ -23,7 +23,7 @@ var Screw = {
23 23 if(Screw.last_suite == suite) {
24 24 $(Screw).trigger('loaded')
25 25 }
26   - })
  26 + });
27 27 });
28 28 },
29 29 root_element: null,

0 comments on commit 85a8add

Please sign in to comment.
Something went wrong with that request. Please try again.