jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Configure Spec Directory #369

Closed Pezmc closed 9 years ago

Pezmc commented 9 years ago

I'm attempting to migrate a project from an older jasmine gem to teaspoon and would love be able to use our existing /test/javascript/ directory over /specs. Skimming your code it looks like it's hardcoded, or have I missed something? If not, consider it a feature request!

I note it's possible to configure the spec directory, but really I'd like to move teaspoon_env

Edit: Looks like that is possible, teaspoon actually checks for test/teaspoon_env.rb as well as the default

mikepack commented 9 years ago

Correct. It also checks for checks in test/javascripts. This is configurable via asset_paths (see the config options)

If you want to specify where to find teaspoon_env.rb, you can use the TEASPOON_ENV environment variable, eg:

TEASPOON_ENV=jstests/teaspoon_env.rb teaspoon