diff --git a/lib/parallel_tests/cucumber/scenarios.rb b/lib/parallel_tests/cucumber/scenarios.rb index 7f9b374e..f6fdb0f6 100644 --- a/lib/parallel_tests/cucumber/scenarios.rb +++ b/lib/parallel_tests/cucumber/scenarios.rb @@ -48,6 +48,12 @@ def split_into_scenarios(files, tags = '') document = ::CukeModeler::FeatureFile.new(path) feature = document.feature + # Check if feature is not nil before proceeding + if feature.nil? + warn "No feature found in #{path}. Skipping file." + next + end + # We make an attempt to parse the gherkin document, this could be failed if the document is not well formatted feature_tags = feature.tags.map(&:name)