Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 684 Bytes

RSpec-RepeatedExampleGroupBody.md

File metadata and controls

42 lines (30 loc) · 684 Bytes

Pattern: Rrepeated describe and context block body

Issue: -

Description

Check for repeated describe and context block body.

Examples

# bad
describe 'cool feature x' do
  it { cool_predicate }
end

describe 'cool feature y' do
  it { cool_predicate }
end

# good
describe 'cool feature' do
  it { cool_predicate }
end

describe 'another cool feature' do
  it { another_predicate }
end

# good
context 'when case x', :tag do
  it { cool_predicate }
end

context 'when case y' do
  it { cool_predicate }
end

Further Reading