2

I want to run my capybara-webkit-enabled acceptance tests through Pow. Our app has several subdomains, and it's a pain getting it to work. If I run my tests through pow, though, they work. Only problem is I have to edit my .powenv and restart pow to run my tests, and then same deal to go back to the dev env.

My goal now is to have appname.dev go to my app with the development environment loaded, and appname.test go to the same app with test environment.

Is this possible with pow?

I can set up appname.dev and appname.test (http://pow.cx/manual.html#section_3.1), but they both read the same .powenv, and thus start with the same RAILS_ENV.

Bernhard Barker
  • 54,589
  • 14
  • 104
  • 138
Martin Svalin
  • 2,227
  • 1
  • 17
  • 23

1 Answers1

0

This question, and its two answers might be useful for your issue.

I think the core answer is that this is done mainly within Rails, as opposed to within Pow. You'd have your Rails app determine the hostname being accessed, and then behave accordingly ... The only place that Pow steps in is the actual serving of different hostnames for the same Rails app (so, multiple symlinks in ~/.pow that all point to the same Rails app).

The question (and its two answers, and the blog post that's linked from there) handle this on the domain site, not the tld side ... So the examples will be closer to using app-testing.dev and app-development.dev than using app.dev and app.test. It might be possible to accomplish the same thing with the tld, but I haven't worked that out yet.

Community
  • 1
  • 1
James Chevalier
  • 10,604
  • 5
  • 48
  • 74