jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Support files not found #392

Closed testzugang closed 9 years ago

testzugang commented 9 years ago

I tried to use chai-datetime as additional plugin and placed it in spec/javascript/support and added the require in spec_helper.js. It seems that the browser loads the js file but all methods are undefined when running the specs. Is there anything else which has to be configured?

mikepack commented 9 years ago

Did you require it after requiring chai? I just set up a new app with chai-datetime, and it worked. I did nothing more than add the chai-datetime library to spec/javascripts/support, and put //=require support/chai-datetime in spec_helper.js, right below //=require support/chai-datetime.

testzugang commented 9 years ago

Thanks for your effort. I tried again with a very basic setup and found out that window.expect = chai.expect; in spec_helper.js had to be commented in to make it work with chai-datetime. Regular chai specs were working already before.