spec/rubocop/cop/rspec/pending_spec.rb in rubocop-rspec-1.25.0 vs spec/rubocop/cop/rspec/pending_spec.rb in rubocop-rspec-1.25.1
- old
+ new
@@ -104,10 +104,18 @@
^^^^^^^^^^^^^^ Pending spec found.
end
RUBY
end
+ it 'flags pending examples when receiver is explicit' do
+ expect_offense(<<-RUBY)
+ RSpec.xit 'test' do
+ ^^^^^^^^^^^^^^^^ Pending spec found.
+ end
+ RUBY
+ end
+
it 'does not flag describe' do
expect_no_offenses(<<-RUBY)
describe 'test' do; end
RUBY
end
@@ -155,8 +163,14 @@
end
it 'does not flag example_group' do
expect_no_offenses(<<-RUBY)
example_group 'test' do; end
+ RUBY
+ end
+
+ it 'does not flag method called pending' do
+ expect_no_offenses(<<-RUBY)
+ subject { Project.pending }
RUBY
end
end