jasmine / jasmine-gem

Jasmine ruby gem
682 stars 275 forks source link

Not loading the stylesheets from jasmine.yml #201

Closed HoneyryderChuck closed 10 years ago

HoneyryderChuck commented 10 years ago

Hi, I'm upgrading our jasmine from 1.3.2 to 2.0.0. After dealing with jasmine-jquerya and jasmine-ajax (now mock-ajax), I found out my stylesheets are not being loaded. I have the following jasmine.yml:

src_dir: "app/assets/javascript"
src_files:
   - "application.{js.coffee,js,coffee}"
stylesheets:
  - "./app/assets/stylesheets/application.{css}"
  - " app/assets/stylesheets/application.{css}"
  - "assets/stylesheets/application.{css}"
spec_dir: spec/javascripts
helpers:
  - "helpers/**/*.{js.coffee,js,coffee}"
spec_files:
  - "**/*[Ss]pec.{js.coffee,js,coffee}"
tmp_dir: "tmp/jasmine"

but the runner is not loading the application.css. I also tried the three stylesheet path alternatives alone. I am using the asset pipeline, I don't know if it is because of it. I'm also using ruby 1.9.3 with rails 3.2.13. How is this setup?

ragaskar commented 10 years ago

All you should need in stylesheets is /assets/stylesheets/application.css. You can check what path jasmine needs by starting a jasmine server, going to the webpage, and trying paths until it works. IE, try http://localhost:8888/assets/stylesheets/application.css -- does that get your stylesheet?

HoneyryderChuck commented 10 years ago

Thx man, it was exactly that that was missing. the right answer is "assets/application.css". sprockets apparently takes care of the rest.