lib/cucumber/formatter/json.rb in cucumber-3.1.0 vs lib/cucumber/formatter/json.rb in cucumber-3.1.1
- old
+ new
@@ -1,6 +1,7 @@
# frozen_string_literal: true
+
require 'multi_json'
require 'base64'
require 'cucumber/formatter/backtrace_filter'
require 'cucumber/formatter/io'
require 'cucumber/formatter/hook_query_visitor'
@@ -295,10 +296,10 @@
@test_case_hash[:tags] = tags unless tags.empty?
comments = []
comments += Formatter.create_comments_array(scenario.comments) unless scenario.comments.empty?
comments += @examples_table_comments if @examples_table_comments
comments += @row_comments if @row_comments
- @test_case_hash[:comments] = comments unless comments.empty?
+ @test_case_hash[:comments] = comments unless comments.empty?
end
def examples_table(examples_table)
# the json file have traditionally used the header row as row 1,
# wheras cucumber-ruby-core used the first example row as row 1.