-
Notifications
You must be signed in to change notification settings - Fork 4
Grouping Tests by Directory
Today, WatirCraft supports storing features in nested directories. You
can use the cucumber
command to run only the features in a particular subdirectory.
If you want to store specs from nested directories, you
need to copy the spec_helper.rb into each subdirectory and modify this
line so that it continues to correctly point to the lib directory (where
you store all your helpers):
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib/')
(It would would be nice if the spec generator knew how to
do this automatically, but it does not currently do this.)
After you have done this, you can use the spec
command to run tests from a specific directory (or just use ruby).
In both cases, you would currently need to use the cucumber/rspec
commands to run tests from only one directory. But we could add rake
tasks to WatirCraft that would do this automatically. I don’t think this
would be very difficult. Let me know.