Created
December 7, 2012 21:58
-
-
Save rmw/4236852 to your computer and use it in GitHub Desktop.
Handling vendored javascript in Jasmine + Jasmine headless
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is a manifest file that'll be compiled into application.js, which will include all the files | |
| // listed below. | |
| // | |
| // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
| // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. | |
| // | |
| // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
| // the compiled file. | |
| // | |
| // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD | |
| // GO AFTER THE REQUIRES BELOW. | |
| // | |
| //= require gem_vendored | |
| //= require_tree ./lib | |
| //= require_tree ./application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :ci do | |
| desc "Run the headless Jasmine suite" | |
| task :jasmine do | |
| sh "bundle exec xvfb-run jasmine-headless-webkit --use-server" | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //= require jquery | |
| //= require jquery_ujs | |
| //= require_tree ./vendor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gem 'jasmine-headless-webkit', git: "git://github.com/johnbintz/jasmine-headless-webkit.git" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| src_files: | |
| - gem_vendored.js #need this for jasmine-headless | |
| - assets/gem_vendored.js #this for regular jasmine | |
| - spec/javascripts/support/vendor/**/*.js | |
| - spec/javascripts/support/helpers/**/*.js | |
| - app/assets/javascripts/lib/**/*.js | |
| - app/assets/javascripts/application/**/*.js | |
| - app/assets/javascripts/views/**/*.js | |
| asset_paths: | |
| - app/assets/javascripts | |
| - vendor/assets/javascripts | |
| helpers: | |
| - "helpers/**/*.{js,coffee}" | |
| spec_files: | |
| - "**/*[Ss]pec.{js,coffee}" | |
| spec_dir: spec/javascripts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment