modeset/teabag — pull request #62 by deliciousmorsel (2013-04-26 16:48:57+00:00)
Title: Adding better support for require.js

I occasionally have issues using require.js with specs not loading correctly. So I decided to look at way teabag was loading spec files in and thought it would be better to use require for loading all the files.

I ended up adding a require.js suite level configuration option. "use_require".
```ruby
Teabag.setup do |config|
config.suite do |suite|
suite.use_require = true
end
end
```
On the runner.html it requires the specs then loads then runs the test. Users spec_helper only has to load require.js and their other dependencies they normally would have.
```javascript
//= require require
```

By doing this, I have my test runner running 100% of the time, vs about 70% previously. It als removed the need to specify names for the specs. Aka:
```javascript
define('path/to/Spec' , ['something/Dependancy'] , function (Dependancy) {
});
```
Now:
```javascript
define(['something/Dependancy'] , function (Dependancy) {
});
```