Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Jasmine & Rails 3.1 asset pipeline don't play well together; a workaround
task :copy_jquery_files do
# Jasmine doesn't work with the asset pipeline; therefore we copy the jquery
# files manually.
spec = Gem::Specification.find_by_name("jquery-rails")
jquery_dir = +
"gems" +
"#{}-#{spec.version}" +
"vendor" +
"assets" +
jquery_file = jquery_dir + "jquery.min.js"
jquery_ui_file = jquery_dir + "jquery-ui.min.js"
destination_dir = + "spec" + "javascripts" + "tmp_helpers"
rm_rf destination_dir
mkdir destination_dir
cp jquery_file, destination_dir
cp jquery_ui_file, destination_dir
task :"jasmine:require" => [:copy_jquery_files]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.