RuboCop RSpec follows the RuboCop versioning guide.
In a nutshell, between major versions new cops are introduced in a special
That means that they won’t be run unless explicitly told otherwise.
RuboCop will warn on start that certain cops are neither explicitly enabled and disabled.
On a major version release, all
pending cops are enabled.
Enforce the guidelines and best practices outlined in the community RSpec style guide
Simplify the process of adopting new RSpec functionality
calculator.compute(line_item).should == 5
is a feature of RSpec itself - you can read about it in the "Disable should syntax" section of RSpec Documentation.
RSpec.describe MyClass do
describe MyClass do
can be achieved using RSpec’s
disable_monkey_patching! method, which you can read more about in the RSpec Documentation. This will also prevent
should from being defined on every object in your system.
should you will need all your specs to use the
expect syntax. You can use Transpec, which will do the conversion for you.