Yoji Shidara
null+****@clear*****
Wed Sep 18 17:05:34 JST 2013
Yoji Shidara 2013-09-18 17:05:34 +0900 (Wed, 18 Sep 2013) New Revision: 2658712c600bd1e86ccf3d8993216d7245a81bba https://github.com/droonga/drntest/commit/2658712c600bd1e86ccf3d8993216d7245a81bba Message: Save actual as .reject when rejected Modified files: lib/drntest/tester.rb Modified: lib/drntest/tester.rb (+4 -1) =================================================================== --- lib/drntest/tester.rb 2013-09-18 16:12:37 +0900 (d16116c) +++ lib/drntest/tester.rb 2013-09-18 17:05:34 +0900 (17d8f92) @@ -69,6 +69,7 @@ module Drntest return end actual = normalize_result(actual) + actual_json = actual.to_json if File.exist?(expected_path) expected = JSON.parse(File.read(expected_path)) @@ -81,11 +82,13 @@ module Drntest p expected puts "Actual:" p actual + reject_path = target_path.sub_ext(".reject") + puts "Saving received result as #{reject_path}" + File.write(reject_path, actual_json) end else actual_path = target_path.sub_ext(".actual") puts "No expectation specified. Saving result as #{actual_path}." - actual_json = actual.to_json File.write(actual_path, actual_json) end end -------------- next part -------------- HTML����������������������������...Download