views:

106

answers:

1

When I use the "Show me the page" step, with Capybara / Cucumber, can I control where the files get output? I can't seem to find the config for this, and my google fu is failing me.

Right now it appears that by default they go to the root of my rails folder and clutter up things there.

+2  A: 

There is indeed a config option that allows you to specify where to output the files:

Capybara.save_and_open_page_path

I believe it was added in the latest version (0.3.9)

In your env.rb file you can do something like:

Capybara.save_and_open_page_path = '/Users/jsboulanger/my-rails-project/tmp'
jsboulanger
Brilliant! Though, it looked like the path was relative to my rails project, so I could just use:Capybara.save_and_open_page_path = 'tmp'But it worked great - thanks!
Vulgrin
You're right, shouldn't be using an absolute path anyway.
jsboulanger