spec/rubocop/cop/rspec/capybara/feature_methods_spec.rb in rubocop-rspec-1.25.1 vs spec/rubocop/cop/rspec/capybara/feature_methods_spec.rb in rubocop-rspec-1.26.0
- old
+ new
@@ -74,9 +74,18 @@
end
end
RUBY
end
+ it 'allows includes before the spec' do
+ expect_offense(<<-RUBY)
+ require 'rails_helper'
+
+ RSpec.feature 'Foo' do; end
+ ^^^^^^^ Use `describe` instead of `feature`.
+ RUBY
+ end
+
context 'with configured `EnabledMethods`' do
let(:cop_config) { { 'EnabledMethods' => %w[feature] } }
it 'ignores usage of the enabled method' do
expect_no_offenses(<<-RUBY)