Yoji Shidara
null+****@clear*****
Thu Sep 19 13:43:13 JST 2013
Yoji Shidara 2013-09-19 13:43:13 +0900 (Thu, 19 Sep 2013) New Revision: f201373b02eb8acb2b92881859fab6a539d905f8 https://github.com/droonga/drntest/commit/f201373b02eb8acb2b92881859fab6a539d905f8 Message: Extract load_request_envelope method Modified files: lib/drntest/test-runner.rb Modified: lib/drntest/test-runner.rb (+6 -2) =================================================================== --- lib/drntest/test-runner.rb 2013-09-19 13:40:57 +0900 (5af327f) +++ lib/drntest/test-runner.rb 2013-09-19 13:43:13 +0900 (0dff44d) @@ -14,10 +14,10 @@ module Drntest def run client = Droonga::Client.new(tag: tester.tag, port: tester.port) - envelope = JSON.parse(target_path.read) print "#{target_path}: " - actual = client.connection.send_receive(envelope) + request_envelope = load_request_envelope + actual = client.connection.send_receive(request_envelope) unless actual puts "No response received" return @@ -38,6 +38,10 @@ module Drntest end end + def load_request_envelope + JSON.parse(target_path.read) + end + def load_expected expected = JSON.parse(expected_path.read) normalize_result(expected) -------------- next part -------------- HTML����������������������������...Download