lib/gurke/cli.rb in gurke-3.3.4 vs lib/gurke/cli.rb in gurke-3.3.5

- old
+ new

@@ -65,11 +65,11 @@ opt :pattern, 'File pattern matching feature files to be run.', default: 'features/**/*.feature' opt :require, 'Files matching this pattern will be required after' \ 'loading environment but before running features.', default: ['features/steps/**/*.rb', - 'features/support/steps/**/*.rb'], + 'features/support/steps/**/*.rb',], multi: true opt :tags, 'Only run features and scenarios matching given tag ' \ 'filtering expression. TODO: Description.', default: ['~wip'], multi: true @@ -83,10 +83,10 @@ def expand_files(files, options) files = Dir[options[:pattern].to_s] if files.empty? && options[:pattern] files.each_with_object([]) do |input, memo| if File.directory? input - Dir[input + '/**/*'].each do |file_in_dir| + Dir["#{input}/**/*"].each do |file_in_dir| if options[:pattern] && !File.fnmatch?(options[:pattern], file_in_dir) next end