testdouble / jasmine-rails

A Jasmine runner for rails projects that's got you covered in both the terminal and the browser
http://rubygems.org/gems/jasmine-rails
MIT License
378 stars 154 forks source link

Unable to find fixtures #169

Closed workmaster2n closed 9 years ago

workmaster2n commented 9 years ago

I have jasmine-jquery.js under my app/assets/javascripts folder (for inclusion via asset pipeline).

I have spec/javascripts/fixtures/index.html defined as follows:

<div id="container"></div>

My spec is as follows

#= require jquery
#= require jasmine-jquery

describe 'deployment page', ->
  it 'works', ->
    loadFixtures('index.html')

I am getting this error:

 Fixture could not be loaded: spec/javascripts/fixtures/index.html (status: error, 

I have this same setup with the jasmine gem (except I include the files via jasmine.yml) and this spec operates with no errors.

I think I've got something configured incorrectly. Is there something different I need to do since the rails server is now serving the assets (since we are visiting localhost:3000)?

Thanks

searls commented 9 years ago

Jasmine-rails doesn't support external fixture files by design. Consider using jasmine-fixture instead. On Thu, Aug 27, 2015 at 17:30 Tyler DeWitt notifications@github.com wrote:

I have jasmine-jquery.js under my app/assets/javascripts folder (for inclusion via asset pipeline).

I have spec/javascripts/fixtures/index.html defined as follows:

My spec is as follows

= require jquery

= require jasmine-jquery

describe 'deployment page', -> it 'works', -> loadFixtures('index.html')

I am getting this error:

Fixture could not be loaded: spec/javascripts/fixtures/index.html (status: error,

I have this same setup with the jasmine gem (except I include the files via jasmine.yml) and this spec operates with no errors.

I think I've got something configured incorrectly. Is there something different I need to do since the rails server is now serving the assets (since we are visiting localhost:3000)?

Thanks

— Reply to this email directly or view it on GitHub https://github.com/searls/jasmine-rails/issues/169.

workmaster2n commented 9 years ago

Is there a way to load up the rails views for a spec since we are serving the specs from localhost?

searls commented 9 years ago

That is also not desired behavior, sorry. I wrote about it more here: http://searls.testdouble.com/posts/2011-12-11-jasmine-fixtures.html

On Thu, Aug 27, 2015 at 6:17 PM Tyler DeWitt notifications@github.com wrote:

Is there a way to load up the rails views for a spec since we are serving the specs from localhost?

— Reply to this email directly or view it on GitHub https://github.com/searls/jasmine-rails/issues/169#issuecomment-135571437 .