searls/jasmine-rails — pull request #146 by AntiFish03 (2014-10-09 22:41:25+00:00)
Title: Getting Requirejs to properly do its thing with Jasmine

...onsole.

Changes:
Added capybara as a dependency
Modified spec_runner_helper.rb
Adjusted the way jasmine_js_files method loads in the event that requirejs is in use.
Added access to the JasmineRails spec_files.
Checking for a custom boot js and loading it in place of the other boot scripts.
Modified spec_runner.html.erb
Added logic to use requirejs if loaded. Set to load all specs as require deps.
Modified jasmine-rails.rb
Added support_dir to allow the boot.js to be defined next to the jasmine.yml
Added custom_boot method to define the boot.js
Modified install_generator.rb
Added the creation of the rjs-boot.js
Modified jasmine.yml
Added support for custom boot.js
Added rjs-boot.js
Copied from Jasmine-core and modified to correctly work with requirejs
Modified engine.rb
Added the support path to the asset path
Modified runner.rb
Big changes here...
If requirejs is defined we need to handle things a little differently here... we need to start up a server and allow requirejs and asset pipeline to do what they do.
Trying to preload assets with requirejs is a nightmare and the only way to attempt it would be to run the requirejs optimizer (r.js) and that will potentially change the code that we are wanting to test.