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

Ensure `RAILS_ENV` is set to `test` when running tests #162

Closed rudyjahchan closed 8 years ago

rudyjahchan commented 9 years ago

Addresses searls/jasmine-rails#121 - In brief, a recurring source of issues has been forgetting to set RAILS_ENV to test before running the spec:javascript task. This is an implementation of a solution proposed in the issue discussion, namely a guard check to see if the environment is correct and (if it isn't) launch the task again in the correct environment.

searls commented 9 years ago

Heh, why does this PR include the test-unit gem?

rudyjahchan commented 9 years ago

Cause I am sloppy. ;-)

I was still having a problem getting the tests running for Rails 3.2 as it kept saying it couldn't find the assertions. On a lark I did that with a mind to come back and remove it. Forgot to do that. Will fix and push up. On Mon, Apr 20, 2015 at 5:42 AM Justin Searls notifications@github.com wrote:

Heh, why does this PR include the test-unit gem?

— Reply to this email directly or view it on GitHub https://github.com/searls/jasmine-rails/pull/162#issuecomment-94442017.

searls commented 9 years ago

I just pulled this down and reverted the gemfile change and while the tests passed, I expected them to.

If your PR worked then the test suite should pass even if you revert this commit: https://github.com/searls/jasmine-rails/commit/6a6a43babdafe7e4344eef1ab36c64a12286b2db

But for me, they fail if I do that.

searls commented 8 years ago

Continuing in #173