johnbintz / jasmine-headless-webkit

This project is dead. You should use Karma instead. I do.
http://karma-runner.github.io/
196 stars 99 forks source link

ReferenceError: Can't find variable: jQuery #168

Open eugenekorpan opened 11 years ago

eugenekorpan commented 11 years ago

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

evgenyneu commented 11 years ago

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"
lenntt commented 11 years ago

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+?