From 05bb3bedbc8a3375e07896b458a204f2053e018e Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Thu, 14 Jul 2022 10:56:06 -0400 Subject: [PATCH] fix: add blank? refinement for TrueClass and FalseClass --- lib/pact_broker/string_refinements.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/pact_broker/string_refinements.rb b/lib/pact_broker/string_refinements.rb index 2c389e248..0321006d0 100644 --- a/lib/pact_broker/string_refinements.rb +++ b/lib/pact_broker/string_refinements.rb @@ -1,5 +1,25 @@ module PactBroker module StringRefinements + refine TrueClass do + def blank? + false + end + + def present? + true + end + end + + refine FalseClass do + def blank? + false + end + + def present? + true + end + end + refine NilClass do def blank? true