ember-cli-rails-addon icon indicating copy to clipboard operation
ember-cli-rails-addon copied to clipboard

environment "development" when running tests in browser

Open tarzan opened this issue 9 years ago • 2 comments

When I add the addon to my package.json the environment of my app becomes development everywhere, where it used to be test when running ember serve and browsing to localhost:4200/tests.

I can not figure out the cause of this behavior, only that removing this addon from package.json gives me the expected behavior again...

tarzan avatar Dec 24 '15 12:12 tarzan

anyone got a clue why this happens?

tarzan avatar Jan 04 '16 09:01 tarzan

That sounds normal: http://ember-cli.com/user-guide/#testing

Alternatively you can run the tests in your regular browser using the QUnit interface. Run ember server and navigate to http://localhost:4200/tests. When the app runs in /tests it runs in the development environment, not the test environment.

There is some stuff at https://www.github.com/thoughtbot/ember-cli-rails#ember_env about the Rails environment being forwarded to the ember app, but that'll only happen when you go through the rails server (port 3000) not the ember server (port 4200).

nruth avatar May 02 '16 17:05 nruth