summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2023-08-03 23:37:45 -0600
committerDan Allen <dan.j.allen@gmail.com>2023-08-04 00:38:00 -0600
commit26d1bd7a02d894ffff9300311e013355dc38a166 (patch)
tree68808c296cbe8e282c11a375712d855bf2af2507
parentf836073d95bd909bfe40b0eb089d18f52540e9d8 (diff)
modify with_content_spacer to accept units and fill color as options
-rw-r--r--spec/spec_helper/helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/spec_helper/helpers.rb b/spec/spec_helper/helpers.rb
index a6a99bcd..6495a3b2 100644
--- a/spec/spec_helper/helpers.rb
+++ b/spec/spec_helper/helpers.rb
@@ -279,11 +279,11 @@ module RSpec::ExampleHelpers
RSpec::ExampleGroupHelpers.windows?
end
- def with_content_spacer width, height, units = 'pt'
+ def with_content_spacer width, height, units: 'pt', fill: '#999999'
contents = <<~END
<svg width="#{width}#{units}" height="#{height}#{units}" viewBox="0 0 #{width} #{height}" version="1.0" xmlns="http://www.w3.org/2000/svg">
<g>
- <rect style="fill:#999999" width="#{width}" height="#{height}" x="0" y="0"></rect>
+ <rect style="fill:#{fill}" width="#{width}" height="#{height}" x="0" y="0"></rect>
</g>
</svg>
END