jasmine-headless-webkit icon indicating copy to clipboard operation
jasmine-headless-webkit copied to clipboard

ReferenceError: Can't find variable: jQuery

Open eugenekorpan opened this issue 13 years ago • 2 comments

Hi, I really like the idea of running jasmine specs without browser, especially when I need to run them on CI tool. So I'm trying to make it up and running but get error while running the specs

http://pastie.org/4790584

the funny thing is when I run specs with rake jasmine:ci or using jasmine server they pass successfully.

Any ideas?

Thanks, Eugene

eugenekorpan avatar Sep 24 '12 11:09 eugenekorpan

I have the similar problem. After upgrading jasmine-headless-webkit gem to 0.9.0.rc.2 it shows the error when I run tests in guard

Guard::JasmineHeadlessWebkit running the following: [..].coffee
couldn't find file 'jquery'

Tests work fine from command line: bundle exec jasmine-headless-webkit. Tests worked both from command line and guard in previous version 0.8.4.

jasmine.yml:

src_files:
 - "application.{js,coffee}"

stylesheets:

helpers:
  - "helpers/**/*.{js,coffee}"

spec_files:
  - "**/*[Ss]pec.{js,coffee}"

src_dir: "app/assets/javascripts"

spec_dir: spec/javascripts

asset_paths:
 - "vendor/assets/javascripts"

evgenyneu avatar Dec 07 '12 00:12 evgenyneu

similar issue, Jasmine from the browser thinks everything is ok, but bundle exec rake jasmine-headless-webkit shows the following:

  bundle exec jasmine-headless-webkit
  Got bus address:  "unix:abstract=/tmp/dbus-8Ghk5lRJKz,guid=b48e48f488bbac4c50a1adaa00000010" 
  Connected to accessibility bus at:  "unix:abstract=/tmp/dbus-  8Ghk5lRJKz,guid=b48e48f488bbac4c50a1adaa00000010" 
  Registered DEC:  true 
  Registered event listener change listener:  true 
  ReferenceError: Can't find variable: $

  Test ordering seed: --seed 5834

I use rails-jquery and put assets/jquery in my jasmine.yml

could it have to do something with the asset pipeline of rails 3.1+?

lenntt avatar Feb 20 '13 12:02 lenntt