rubocop-rspec 1.20.0 → 1.20.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75a86e91f1a68118254233b1bc1f34b78c8b96ce3e0f807bde3dc7a3450db2b8
4
- data.tar.gz: 956ce60a540a49bf96425aeb3a856028600bff19a482dc5e90198e0419879b83
3
+ metadata.gz: fc22359823d51921927c6eccc2042da9aeba3da2ce8587e23afdbe55bc3b2840
4
+ data.tar.gz: 2444605d47dbe964004743b2581a849ccd571c0fbbdc0bd398a6c03755842e4c
5
5
  SHA512:
6
- metadata.gz: bb066d3c753eb46efffb2acd402f9747a6673af7d8c7748c7c9f7ddec23d67533902dc851315d8750a97f194a8b2266b05c84835c41ff768f3240aa88c8b077d
7
- data.tar.gz: 040ec718d9a63756636881881b6f8002ed40f04e1eb2a50efd5c2def669487b9d4184e430e9ecf45b39781f5593d064e1604c5b4549689f9fc575afbe0282c25
6
+ metadata.gz: dc6aaa5e37a13006b8e66478889cad7a51ce8599075d0304f21cd235cab42ae62209a2bede56a0dd984956302719ef00477680ac4bc6c3cd766a456fc8742d7c
7
+ data.tar.gz: 597ed8a84f733c73bb489b722fb26fbc2120514bf19b6fd091641094a2da8d3f7b3942fe1be33150cfa2c0f96bc926d191658df42226ac19b6ff97e9d7955997
@@ -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][])
@@ -49,6 +49,7 @@ RSpec/ContextWording:
49
49
  Prefixes:
50
50
  - when
51
51
  - with
52
+ - without
52
53
  StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording
53
54
 
54
55
  RSpec/DescribeClass:
@@ -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', and 'with'
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
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module RSpec
5
5
  # Version information for the RSpec RuboCop plugin.
6
6
  module Version
7
- STRING = '1.20.0'.freeze
7
+ STRING = '1.20.1'.freeze
8
8
  end
9
9
  end
10
10
  end
@@ -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[without] } }
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 'without'.
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 'without a display name' do
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.0
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-09 00:00:00.000000000 Z
13
+ date: 2017-11-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop