Skip to content

Commit 3e7faa4

Browse files
authored
Avoid Ruby warnings "ambiguous first argument" (#881)
- add parentheses to disambiguate
1 parent 8f4f407 commit 3e7faa4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/draper/collection_decorator_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ module Draper
217217
it "uses the custom class name" do
218218
decorator = ProductsDecorator.new([])
219219

220-
expect(decorator.to_s).to match /ProductsDecorator/
220+
expect(decorator.to_s).to match(/ProductsDecorator/)
221221
end
222222
end
223223
end

spec/draper/decorator_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ module Draper
439439
it "returns a detailed description of the decorator" do
440440
decorator = ProductDecorator.new(double)
441441

442-
expect(decorator.inspect).to match /#<ProductDecorator:0x\h+ .+>/
442+
expect(decorator.inspect).to match(/#<ProductDecorator:0x\h+ .+>/)
443443
end
444444

445445
it "includes the object" do

0 commit comments

Comments
 (0)