Skip to content

Instantly share code, notes, and snippets.

@Dishwasha
Created January 12, 2012 19:27
Show Gist options
  • Save Dishwasha/1602521 to your computer and use it in GitHub Desktop.
Save Dishwasha/1602521 to your computer and use it in GitHub Desktop.
Add jasmine to default rake task
require 'rspec/core'
require 'rspec/core/rake_task'
require 'jasmine-headless-webkit'
# Run Jasmine headless via webkit
Jasmine::Headless::Task.new('jasmine:headless')
# Add to default rake task
if default = Rake.application.instance_variable_get('@tasks')['default']
default.prerequisites.unshift('jasmine:headless')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment