Is there is a cop that can enforce the style of .to as sometimes getting mixed examples in our codebase, for example .to(eq) and .to eq, so wondering if there is anything that can enforce:
# Good
expect(element.name).to eq("Country")
# Also good (maybe?)
expect(element.name).to eq "Country"
# Bad
expect(element.name).to(eq("Country"))
I've been looking through the RSpec cops and can't see anything, so suspect not, but wondering if this would be useful?
Is there is a cop that can enforce the style of
.to
as sometimes getting mixed examples in our codebase, for example.to(eq)
and.to eq
, so wondering if there is anything that can enforce:I've been looking through the RSpec cops and can't see anything, so suspect not, but wondering if this would be useful?