spec/rubocop/cop/rspec/describe_class_spec.rb in rubocop-rspec-1.2.2 vs spec/rubocop/cop/rspec/describe_class_spec.rb in rubocop-rspec-1.3.0
- old
+ new
@@ -25,9 +25,26 @@
' describe "bad describe" do; end',
'end'])
expect(cop.offenses).to be_empty
end
+ it 'ignores request specs' do
+ inspect_source(cop, "describe 'my new feature', type: :request do; end")
+ expect(cop.offenses).to be_empty
+ end
+
+ it 'ignores feature specs' do
+ inspect_source(cop, "describe 'my new feature', type: :feature do; end")
+ expect(cop.offenses).to be_empty
+ end
+
+ it 'ignores feature specs - also with complex options' do
+ inspect_source(cop, ["describe 'my new feature',",
+ ' :test, :type => :feature, :foo => :bar do;',
+ 'end'])
+ expect(cop.offenses).to be_empty
+ end
+
it "doesn't blow up on single-line describes" do
inspect_source(cop, 'describe Some::Class')
expect(cop.offenses).to be_empty
end
end