Sha256: 83590bb1972e6c03cedc23889bd7e89da07e296d772e7b189dbb20d5af2101fe
Contents?: true
Size: 1.96 KB
Versions: 1
Compression:
Stored size: 1.96 KB
Contents
//// Do NOT edit this file by hand directly, as it is automatically generated. Please make any necessary changes to the cop documentation within the source files themselves. //// = RSpec/Extra == RSpec/Extra/BeEmpty |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed | Pending | Yes | Always | 0.2 | - |=== Prefer using `be_empty` when checking for an empty array. === Examples [source,ruby] ---- # bad expect(array.empty?).to be true expect(array.empty?).to be_truthy expect(array.size).to eq(0) expect(array.length).to eq(0) expect(array.count).to eq(0) expect(array).to eql([]) expect(array).to contain_exactly expect(array).to match_array([]) # good expect(array).to be_empty ---- === References * https://www.rubydoc.info/gems/rubocop-rspec-extra/RuboCop/Cop/RSpec/Extra/BeEmpty == RSpec/Extra/RestrictBlockTag |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed | Disabled | Yes | No | 0.2 | - |=== Restrict to only allowed block tags. === Examples ==== AllowTags: ['foo', 'bar'] [source,ruby] ---- # bad RSpec.describe 'Something', :baz do end # bad RSpec.describe 'Something' do context 'when something', baz: :foo do end end # good RSpec.describe 'Something', :foo do end # good RSpec.describe 'Something' do context 'when something', bar: :foo do end end ---- === Configurable attributes |=== | Name | Default value | Configurable values | AllowTags | `[]` | Array |=== == RSpec/Extra/RestrictBlockTagValue |=== | Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed | Pending | Yes | No | 0.2 | - |=== Restrict to only allowed block tag value. === Examples ==== AllowTagValues: { foo: 'baz' } [source,ruby] ---- # bad RSpec.describe 'Something', foo: :bar do end # good RSpec.describe 'Something', foo: :baz do end ---- === Configurable attributes |=== | Name | Default value | Configurable values | AllowTagValues | `{}` | |===
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubocop-rspec-extra-0.2.0 | docs/modules/ROOT/pages/cops_rspec_extra.adoc |