lib/cucumber/formatter/json.rb in cucumber-9.1.1 vs lib/cucumber/formatter/json.rb in cucumber-9.1.2
- old
+ new
@@ -100,22 +100,18 @@
end
private
def same_feature_as_previous_test_case?(test_case)
- current_feature[:uri] == test_case.location.file
+ @feature_hash&.fetch(:uri, nil) == test_case.location.file
end
def first_step_after_background?(test_step)
@in_background && test_step.location.file == @feature_hash[:uri] && test_step.location.lines.max >= @test_case_hash[:line]
end
def internal_hook?(test_step)
test_step.location.file.include?('lib/cucumber/')
- end
-
- def current_feature
- @feature_hash ||= {}
end
def feature_elements
@feature_hash[:elements] ||= []
end