Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the server's environment to test #14

Merged
merged 1 commit into from
Nov 22, 2011
Merged

Set the server's environment to test #14

merged 1 commit into from
Nov 22, 2011

Conversation

dmathieu
Copy link
Contributor

By default, rack runs the server under the development environment.
This changes that behavior, to run it under test, which makes much more sense.

Rails doesn't takes the :environment parameter, so it requires to define the RAILS_ENV variable.

netzpirat added a commit that referenced this pull request Nov 22, 2011
Set the server's environment to test
@netzpirat netzpirat merged commit 2013cff into guard:master Nov 22, 2011
@netzpirat
Copy link
Contributor

Thanks for this!

@netzpirat
Copy link
Contributor

I have slightly changed this: You can define the server environment by setting the :server_env option. By default it uses the development environment and not the test environment, because the rails asset pipeline concatenates the assets in the test environment, and so you'll see error like failure on line 28637 in spec.js instead of failure on line 190 in my_view_spec.js.

@netzpirat
Copy link
Contributor

@dmathieu What Ruby implementation and version are you using? I was running guard-jasmine with JRuby without any problems. Today I tested it for the first time on MRI 1.9.2 & 1.9.3 and noticed that the Rack server kills the Guard completely. I'm just wondering if it's just me...

@dmathieu
Copy link
Contributor Author

I'm using 1.9.3 with this, and it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants