From 3e7faa4369efd1253a338369b4c8ad8e31ba8b68 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Sun, 5 Apr 2020 17:11:25 +0200 Subject: [PATCH] Avoid Ruby warnings "ambiguous first argument" (#881) - add parentheses to disambiguate --- spec/draper/collection_decorator_spec.rb | 2 +- spec/draper/decorator_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/draper/collection_decorator_spec.rb b/spec/draper/collection_decorator_spec.rb index d329e86..63212f7 100644 --- a/spec/draper/collection_decorator_spec.rb +++ b/spec/draper/collection_decorator_spec.rb @@ -217,7 +217,7 @@ module Draper it "uses the custom class name" do decorator = ProductsDecorator.new([]) - expect(decorator.to_s).to match /ProductsDecorator/ + expect(decorator.to_s).to match(/ProductsDecorator/) end end end diff --git a/spec/draper/decorator_spec.rb b/spec/draper/decorator_spec.rb index 9517ee3..a849874 100644 --- a/spec/draper/decorator_spec.rb +++ b/spec/draper/decorator_spec.rb @@ -439,7 +439,7 @@ module Draper it "returns a detailed description of the decorator" do decorator = ProductDecorator.new(double) - expect(decorator.inspect).to match /#/ + expect(decorator.inspect).to match(/#/) end it "includes the object" do