From b3ca3b2b972f6a3e33ac3e23b190ea1f2c011128 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilets Date: Mon, 12 Sep 2016 16:03:11 +0200 Subject: [PATCH] add all information to error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit before patch error is ``` (compared using ==) ✖ expected "" to match /Product created/ Diff: @@ -1,2 +1,2 @@ -/Product created/ +"" ✖ expected: 0 got: 65 ``` with patch ``` (compared using ==) Command /usr/bin/testcommand --options exit_status should eq 0 ✖ expected "" to match /Product created/ Diff: @@ -1,2 +1,2 @@ -/Product created/ +"" Command /usr/bin/testcommand --options ✖ expected: 0 got: 65 ``` --- lib/inspec/rspec_json_formatter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/inspec/rspec_json_formatter.rb b/lib/inspec/rspec_json_formatter.rb index f87e08eb5c..02d689a7f2 100644 --- a/lib/inspec/rspec_json_formatter.rb +++ b/lib/inspec/rspec_json_formatter.rb @@ -371,7 +371,7 @@ def print_results(all) test_color = @colors[test_status] indicator = @indicators[x[:status]] indicator = @indicators['empty'] if indicator.nil? - msg = x[:message] || x[:skip_message] || x[:code_desc] + msg = "#{x[:message]} #{x[:skip_message]} #{x[:code_desc]}" print_line( color: test_color, indicator: @indicators['small'] + indicator,