Skip to content

Instantly share code, notes, and snippets.

@rmw
Created December 7, 2012 21:58
Show Gist options
  • Select an option

  • Save rmw/4236852 to your computer and use it in GitHub Desktop.

Select an option

Save rmw/4236852 to your computer and use it in GitHub Desktop.
Handling vendored javascript in Jasmine + Jasmine headless
// 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
namespace :ci do
desc "Run the headless Jasmine suite"
task :jasmine do
sh "bundle exec xvfb-run jasmine-headless-webkit --use-server"
end
end
//= require jquery
//= require jquery_ujs
//= require_tree ./vendor
gem 'jasmine-headless-webkit', git: "git://github.com/johnbintz/jasmine-headless-webkit.git"
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