File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 55* Implement ` RSpec/DescribedClassModuleWrapping ` to disallow RSpec statements within a module. ([ @kellysutton ] [ ] )
66* Fix documentation rake task to support Rubocop 0.75. ([ @nickcampbell18 ] [ ] )
77* Fix ` RSpec/SubjectStub ` to detect implicit subjects stubbed. ([ @QQism ] [ ] )
8+ * Fix ` RSpec/Pending ` not flagging ` skip ` with string values. ([ @pirj ] [ ] )
89
910## 1.36.0 (2019-09-27)
1011
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class Pending < Cop
4242 def_node_matcher :skipped_in_metadata? , <<-PATTERN
4343 {
4444 (send _ _ <#skip_or_pending? ...>)
45- (send _ _ ... (hash <(pair #skip_or_pending? true) ...>))
45+ (send _ _ ... (hash <(pair #skip_or_pending? { true str } ) ...>))
4646 }
4747 PATTERN
4848
Original file line number Diff line number Diff line change 108108 RUBY
109109 end
110110
111+ it 'flags blocks with skip: string metadata' do
112+ expect_offense ( <<-RUBY )
113+ it 'test', skip: 'skipped because of being slow' do
114+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pending spec found.
115+ end
116+ RUBY
117+ end
118+
111119 it 'flags pending blocks' do
112120 expect_offense ( <<-RUBY )
113121 pending 'test' do
You can’t perform that action at this time.
0 commit comments