jnicklas/evergreen — Issue #54: `require` method does not work reliably
Author: vjpr
Created: 2012-03-06 10:43:01+00:00
State: open

```
var require = function(file) {
document.write('');
};
```

There is no guarantee that by using `document.write`, the js file will load and run before the next line of code runs.

I have run into this problem a few times.

We could use a server-side method to parse the spec files and insert javascript requires into the head during template render.

Or we could do sprockets integration. This would be most ideal, but might be more work. Other jasmine rails integration libraries use this approach.