lib/tork/config/cucumber.rb in tork-15.1.0 vs lib/tork/config/cucumber.rb in tork-16.0.0
- old
+ new
@@ -2,20 +2,20 @@
Tork::Config.all_test_file_globs << 'features/**/*.feature'
Tork::Config.test_file_globbers.update(
# source files that correspond to test files
- %r<^features/(.+/)?step_definitions/.+\.rb$> => lambda do |path|
- path.sub %r<step_definitions/.+$>, '*.feature'
+ %r<^(features/(.+/)?)step_definitions/.+\.rb$> => lambda do |path, matches|
+ matches[1] + '*.feature'
end,
# the actual test files themselves
- %r<^features/.+\.feature$> => lambda {|path| path }
+ %r<^features/.+\.feature$> => lambda {|path, matches| path }
)
-Tork::Config.after_fork_hooks << lambda do |worker_number, log_file, test_file, test_names|
+Tork::Config.after_fork_hooks << lambda do |worker_number, log_file, test_file, line_numbers|
# pass test_file in ARGV to cucumber(1) for running
- ARGV << test_file.dup
+ ARGV << [test_file, *line_numbers].join(':')
require 'cucumber'
require 'rubygems'
cucumber_bin = Gem.bin_path('cucumber', 'cucumber')
at_exit { load cucumber_bin unless $! }