From e34f2e609da635e3571bf3542a8d3a3756315755 Mon Sep 17 00:00:00 2001 From: Kanezoh Date: Fri, 11 Jun 2021 10:44:59 +0900 Subject: [PATCH] require webmock in spec_helper --- spec/http_spec.cr | 1 - spec/page_spec.cr | 1 - spec/spec_helper.cr | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/http_spec.cr b/spec/http_spec.cr index 167206c..3cdfca3 100644 --- a/spec/http_spec.cr +++ b/spec/http_spec.cr @@ -1,5 +1,4 @@ require "./spec_helper" -require "webmock" WebMock.stub(:get, "example.com") WebMock.stub(:get, "http://example.com/?foo=bar&foo1=bar2") diff --git a/spec/page_spec.cr b/spec/page_spec.cr index a40e0a2..b69ff22 100644 --- a/spec/page_spec.cr +++ b/spec/page_spec.cr @@ -1,5 +1,4 @@ require "./spec_helper" -require "webmock" WebMock.stub(:get, "example.com") WebMock.stub(:get, "fail_example.com").to_return(status: 500) WebMock.stub(:get, "body_example.com").to_return(body: "hello") diff --git a/spec/spec_helper.cr b/spec/spec_helper.cr index a3591f8..f3568cc 100644 --- a/spec/spec_helper.cr +++ b/spec/spec_helper.cr @@ -1,2 +1,3 @@ require "spec" +require "webmock" require "../src/mechanize"