rspec-style-guide icon indicating copy to clipboard operation
rspec-style-guide copied to clipboard

Discourage using `it_should_behave_like` and friends

Open pirj opened this issue 5 years ago • 3 comments

There's a number of methods that have modern counterparts, recommend using the new ones instead.

pirj avatar Nov 23 '18 11:11 pirj

For reference, here's where this was added: https://github.com/rspec/rspec-core/commit/7b0d232

andyw8 avatar Apr 28 '19 19:04 andyw8

Why? I don't see why this requires a cop. It's perfectly fine to have readable code sentences, which is why there's first-class support for aliases in rspec.

imajes avatar Apr 07 '21 00:04 imajes

Basically because "should" syntax is being removed from RSpec, along with all references to it. See https://github.com/rspec/rspec-core/pull/2864/files#diff-8c60417422cf21f6d3abdc5b63d992eee058c43039601cc0cee1d7111db85420L1133

pirj avatar Apr 07 '21 05:04 pirj