rubocop-rspec 1.20.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/config/default.yml +1 -0
- data/lib/rubocop/cop/rspec/context_wording.rb +3 -1
- data/lib/rubocop/rspec/version.rb +1 -1
- data/spec/rubocop/cop/rspec/context_wording_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fc22359823d51921927c6eccc2042da9aeba3da2ce8587e23afdbe55bc3b2840
|
|
4
|
+
data.tar.gz: 2444605d47dbe964004743b2581a849ccd571c0fbbdc0bd398a6c03755842e4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc6aaa5e37a13006b8e66478889cad7a51ce8599075d0304f21cd235cab42ae62209a2bede56a0dd984956302719ef00477680ac4bc6c3cd766a456fc8742d7c
|
|
7
|
+
data.tar.gz: 597ed8a84f733c73bb489b722fb26fbc2120514bf19b6fd091641094a2da8d3f7b3942fe1be33150cfa2c0f96bc926d191658df42226ac19b6ff97e9d7955997
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Master (Unreleased)
|
|
4
4
|
|
|
5
|
+
## 1.20.1 (2017-11-15)
|
|
6
|
+
|
|
7
|
+
* Add "without" to list of default allowed prefixes for `RSpec/ContextWording`. ([@bquorning][])
|
|
8
|
+
|
|
5
9
|
## 1.20.0 (2017-11-09)
|
|
6
10
|
|
|
7
11
|
* Rename namespace `FactoryGirl` to `FactoryBot` following original library update. ([@walf443][])
|
data/config/default.yml
CHANGED
|
@@ -8,11 +8,13 @@ module RuboCop
|
|
|
8
8
|
# @see https://github.com/reachlocal/rspec-style-guide#context-descriptions
|
|
9
9
|
# @see http://www.betterspecs.org/#contexts
|
|
10
10
|
#
|
|
11
|
-
# @example `Prefixes` configuration option, defaults: 'when',
|
|
11
|
+
# @example `Prefixes` configuration option, defaults: 'when', 'with', and
|
|
12
|
+
# 'without'
|
|
12
13
|
# Prefixes:
|
|
13
14
|
# - when
|
|
14
15
|
# - with
|
|
15
16
|
# - without
|
|
17
|
+
# - if
|
|
16
18
|
#
|
|
17
19
|
# @example
|
|
18
20
|
# # bad
|
|
@@ -42,19 +42,19 @@ RSpec.describe RuboCop::Cop::RSpec::ContextWording, :config do
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
context 'when configured' do
|
|
45
|
-
let(:cop_config) { { 'Prefixes' => %w[
|
|
45
|
+
let(:cop_config) { { 'Prefixes' => %w[if] } }
|
|
46
46
|
|
|
47
47
|
it 'finds context without whitelisted prefixes at the beginning' do
|
|
48
48
|
expect_offense(<<-RUBY)
|
|
49
49
|
context 'when display name is present' do
|
|
50
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Start context description with '
|
|
50
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Start context description with 'if'.
|
|
51
51
|
end
|
|
52
52
|
RUBY
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
it 'skips descriptions with whitelisted prefixes at the beginning' do
|
|
56
56
|
expect_no_offenses(<<-RUBY)
|
|
57
|
-
context '
|
|
57
|
+
context 'if display name is present' do
|
|
58
58
|
end
|
|
59
59
|
RUBY
|
|
60
60
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubocop-rspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.20.
|
|
4
|
+
version: 1.20.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Backus
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2017-11-
|
|
13
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rubocop
|