rondale-sc / ember-cli-rails-addon

27 stars 37 forks source link

environment "development" when running tests in browser #30

Open tarzan opened 8 years ago

tarzan commented 8 years ago

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 commented 8 years ago

anyone got a clue why this happens?

nruth commented 8 years ago

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).