From 2aaf7e8a389d3d59b15bef33d48bbabfb82f5dc1 Mon Sep 17 00:00:00 2001 From: Alex Reisner <alex@alexreisner.com> Date: Wed, 17 Dec 2014 12:59:38 -0600 Subject: [PATCH] Use MockHttpResponse instead of String. --- test/test_helper.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index bcd31d21..2c197f07 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -81,11 +81,7 @@ module Geocoder def read_fixture(file) filepath = File.join("test", "fixtures", file) s = File.read(filepath).strip.gsub(/\n\s*/, "") - s.instance_eval do - def body; self; end - def code; "200"; end - end - s + MockHttpResponse.new(body: s, code: "200") end ## -- GitLab