@@ -2490,6 +2490,110 @@ expect(foo).not_to receive(:bar)
24902490
24912491* [ https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever ] ( https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReceiveNever )
24922492
2493+ ## RSpec/RepeatedBlockBody
2494+
2495+ Enabled by default | Supports autocorrection
2496+ --- | ---
2497+ Enabled | No
2498+
2499+ Check for repeated describe and context block body.
2500+
2501+ ### Examples
2502+
2503+ ``` ruby
2504+ # bad
2505+ describe ' cool feature x' do
2506+ it { cool_predicate }
2507+ end
2508+
2509+ describe ' cool feature y' do
2510+ it { cool_predicate }
2511+ end
2512+
2513+ # bad
2514+ context ' when case x' do
2515+ it { cool_predicate }
2516+ end
2517+
2518+ describe ' when case y' do
2519+ it { cool_predicate }
2520+ end
2521+
2522+ # good
2523+ describe ' cool feature' do
2524+ it { cool_predicate }
2525+ end
2526+
2527+ describe ' another cool feature' do
2528+ it { another_predicate }
2529+ end
2530+
2531+ # good
2532+ context ' when case x' do
2533+ it { cool_predicate }
2534+ end
2535+
2536+ describe ' when another case' do
2537+ it { another_predicate }
2538+ end
2539+ ```
2540+
2541+ ### References
2542+
2543+ * [ https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedBlockBody ] ( https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedBlockBody )
2544+
2545+ ## RSpec/RepeatedBlockDescription
2546+
2547+ Enabled by default | Supports autocorrection
2548+ --- | ---
2549+ Enabled | No
2550+
2551+ Check for repeated describe and context block descriptions.
2552+
2553+ ### Examples
2554+
2555+ ``` ruby
2556+ # bad
2557+ describe ' cool feature' do
2558+ # example group
2559+ end
2560+
2561+ describe ' cool feature' do
2562+ # example group
2563+ end
2564+
2565+ # bad
2566+ context ' when case x' do
2567+ # example group
2568+ end
2569+
2570+ describe ' when case x' do
2571+ # example group
2572+ end
2573+
2574+ # good
2575+ describe ' cool feature' do
2576+ # example group
2577+ end
2578+
2579+ describe ' another cool feature' do
2580+ # example group
2581+ end
2582+
2583+ # good
2584+ context ' when case x' do
2585+ # example group
2586+ end
2587+
2588+ describe ' when another case' do
2589+ # example group
2590+ end
2591+ ```
2592+
2593+ ### References
2594+
2595+ * [ https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedBlockDescription ] ( https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedBlockDescription )
2596+
24932597## RSpec/RepeatedDescription
24942598
24952599Enabled by default | Supports autocorrection
0 commit comments