Merge pull request #9399 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-2.0.1

build(deps): bump rubocop-rspec from 2.0.0 to 2.0.1 in /Library/Homebrew
This commit is contained in:
Mike McQuaid 2020-12-03 13:27:23 +00:00 committed by GitHub
commit 89bd08ab3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
114 changed files with 262 additions and 229 deletions

View File

@ -111,7 +111,7 @@ GEM
rubocop-ast (>= 1.1.1)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.2.0)
rubocop-ast (1.3.0)
parser (>= 2.7.1.5)
rubocop-performance (1.9.1)
rubocop (>= 0.90.0, < 2.0)
@ -120,7 +120,7 @@ GEM
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.87.0)
rubocop-rspec (2.0.0)
rubocop-rspec (2.0.1)
rubocop (~> 1.0)
rubocop-ast (>= 1.1.0)
rubocop-sorbet (0.5.1)

View File

@ -1116,6 +1116,8 @@ RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp)
class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError
end
RuboCop::AST::NodePattern::LexerRex::NODE_TYPE = T.let(T.unsafe(nil), Regexp)
RuboCop::AST::NodePattern::LexerRex::REGEXP = T.let(T.unsafe(nil), Regexp)
RuboCop::AST::NodePattern::LexerRex::REGEXP_BODY = T.let(T.unsafe(nil), Regexp)
@ -1350,6 +1352,8 @@ RuboCop::AST::NodePattern::Sets::SET_ABSTRACT_OVERRIDE_OVERRIDABLE_ETC = T.let(T
RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_AFTER_ACTION_APPEND_AFTER_ACTION_APPEND_AROUND_ACTION_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_AND_RETURN_AND_RAISE_AND_THROW_ETC = T.let(T.unsafe(nil), Set)
@ -1358,6 +1362,8 @@ RuboCop::AST::NodePattern::Sets::SET_ANY_ALL_NORETURN_ETC = T.let(T.unsafe(nil),
RuboCop::AST::NodePattern::Sets::SET_ANY_INSTANCE_ALLOW_ANY_INSTANCE_OF_EXPECT_ANY_INSTANCE_OF = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_AP_P_PP_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR = T.let(T.unsafe(nil), Set)
@ -1366,10 +1372,14 @@ RuboCop::AST::NodePattern::Sets::SET_BACKGROUND_SCENARIO_XSCENARIO_ETC = T.let(T
RuboCop::AST::NodePattern::Sets::SET_BEFORE_AFTER = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_BELONGS_TO_HAS_ONE_HAS_MANY_HAS_AND_BELONGS_TO_MANY = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_BE_EQ_EQL_EQUAL = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_BE_TRUTHY_BE_FALSEY_BE_FALSY_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_BINWRITE_SYSWRITE_WRITE_WRITE_NONBLOCK = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_CALLER_CALLER_LOCATIONS = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_CALL_RUN = T.let(T.unsafe(nil), Set)
@ -1392,6 +1402,10 @@ RuboCop::AST::NodePattern::Sets::SET_CONTEXT_SHARED_CONTEXT = T.let(T.unsafe(nil
RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_CREATED_AT_UPDATED_AT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_CREATED_AT_UPDATED_AT_2 = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_FEATURE = T.let(T.unsafe(nil), Set)
@ -1412,12 +1426,16 @@ RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.uns
RuboCop::AST::NodePattern::Sets::SET_EXACTLY_AT_LEAST_AT_MOST = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_EXECUTE_REMOVE_BELONGS_TO = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_EXPECT_ALLOW = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FACTORYGIRL_FACTORYBOT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FIRST_TAKE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FIXNUM_BIGNUM = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FLATTEN_FLATTEN = T.let(T.unsafe(nil), Set)
@ -1426,14 +1444,22 @@ RuboCop::AST::NodePattern::Sets::SET_FORMAT_SPRINTF_PRINTF = T.let(T.unsafe(nil)
RuboCop::AST::NodePattern::Sets::SET_GEMCUTTER_RUBYGEMS_RUBYFORGE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_GET_POST_PUT_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB_SUB_SUB = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_HAS_MANY_HAS_ONE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_HAS_MANY_HAS_ONE_BELONGS_TO = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_INCLUDE_MEMBER = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_INSERT_INSERT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set)
@ -1464,6 +1490,8 @@ RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ONLY_EXCEPT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED = T.let(T.unsafe(nil), Set)
@ -1494,10 +1522,16 @@ RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGE_CHAIN = T.let(T.uns
RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_REFERER_REFERRER = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_RENDER_REDIRECT_TO = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_RETURNING_UNIQUE_BY = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL_REJECT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set)
@ -1506,6 +1540,10 @@ RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(
RuboCop::AST::NodePattern::Sets::SET_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_SINCE_FROM_NOW_AFTER_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_SKIP_AFTER_ACTION_SKIP_AROUND_ACTION_SKIP_BEFORE_ACTION_SKIP_ACTION_CALLBACK = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_SKIP_PENDING = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set)
@ -1530,10 +1568,16 @@ RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set
RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TRANSLATE_LOCALIZE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TRY_TRY = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_UNIQ_DISTINCT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET__ = T.let(T.unsafe(nil), Set)

View File

@ -1112,6 +1112,57 @@ class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base
def block_loc(send_node); end
end
module RuboCop::Cop::RSpec::Rails
end
class RuboCop::Cop::RSpec::Rails::HttpStatus < ::RuboCop::Cop::RSpec::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
def http_status(param0 = T.unsafe(nil)); end
def on_send(node); end
private
def checker_class; end
end
class RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker
def initialize(node); end
def message; end
def node; end
def offensive?; end
def preferred_style; end
private
def allowed_symbol?; end
def number; end
def symbol; end
end
RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker::ALLOWED_STATUSES = T.let(T.unsafe(nil), Array)
RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::Rails::HttpStatus::SymbolicStyleChecker
def initialize(node); end
def message; end
def node; end
def offensive?; end
def preferred_style; end
private
def custom_http_status_code?; end
def number; end
def symbol; end
end
RuboCop::Cop::RSpec::Rails::HttpStatus::SymbolicStyleChecker::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::ReceiveCounts < ::RuboCop::Cop::RSpec::Base
extend(::RuboCop::Cop::AutoCorrector)

View File

@ -28085,31 +28085,10 @@ class RuboCop::AST::NodePattern::Parser
end
module RuboCop::AST::NodePattern::Sets
SET_AFTER_ACTION_APPEND_AFTER_ACTION_APPEND_AROUND_ACTION_ETC = ::T.let(nil, ::T.untyped)
SET_AP_P_PP_ETC = ::T.let(nil, ::T.untyped)
SET_BELONGS_TO_HAS_ONE_HAS_MANY_HAS_AND_BELONGS_TO_MANY = ::T.let(nil, ::T.untyped)
SET_BINWRITE_SYSWRITE_WRITE_WRITE_NONBLOCK = ::T.let(nil, ::T.untyped)
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
SET_CREATED_AT_UPDATED_AT = ::T.let(nil, ::T.untyped)
SET_CREATED_AT_UPDATED_AT_2 = ::T.let(nil, ::T.untyped)
SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
SET_EXECUTE_REMOVE_BELONGS_TO = ::T.let(nil, ::T.untyped)
SET_FIRST_TAKE = ::T.let(nil, ::T.untyped)
SET_GET_POST_PUT_ETC = ::T.let(nil, ::T.untyped)
SET_HAS_MANY_HAS_ONE = ::T.let(nil, ::T.untyped)
SET_HAS_MANY_HAS_ONE_BELONGS_TO = ::T.let(nil, ::T.untyped)
SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
SET_INSERT_INSERT = ::T.let(nil, ::T.untyped)
SET_ONLY_EXCEPT = ::T.let(nil, ::T.untyped)
SET_REFERER_REFERRER = ::T.let(nil, ::T.untyped)
SET_RENDER_REDIRECT_TO = ::T.let(nil, ::T.untyped)
SET_RETURNING_UNIQUE_BY = ::T.let(nil, ::T.untyped)
SET_SINCE_FROM_NOW_AFTER_ETC = ::T.let(nil, ::T.untyped)
SET_SKIP_AFTER_ACTION_SKIP_AROUND_ACTION_SKIP_BEFORE_ACTION_SKIP_ACTION_CALLBACK = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
SET_TRANSLATE_LOCALIZE = ::T.let(nil, ::T.untyped)
SET_TRY_TRY = ::T.let(nil, ::T.untyped)
SET_UNIQ_DISTINCT = ::T.let(nil, ::T.untyped)
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
end
@ -28309,56 +28288,6 @@ class RuboCop::Cop::FormulaCop
def required_dependency_name?(param0, param1); end
end
module RuboCop::Cop::RSpec::Rails
end
class RuboCop::Cop::RSpec::Rails::HttpStatus
include ::RuboCop::Cop::ConfigurableEnforcedStyle
def http_status(param0=T.unsafe(nil)); end
def on_send(node); end
end
class RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker
def initialize(node); end
def message(); end
def node(); end
def offensive?(); end
def preferred_style(); end
ALLOWED_STATUSES = ::T.let(nil, ::T.untyped)
MSG = ::T.let(nil, ::T.untyped)
end
class RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker
end
class RuboCop::Cop::RSpec::Rails::HttpStatus::SymbolicStyleChecker
def initialize(node); end
def message(); end
def node(); end
def offensive?(); end
def preferred_style(); end
MSG = ::T.let(nil, ::T.untyped)
end
class RuboCop::Cop::RSpec::Rails::HttpStatus::SymbolicStyleChecker
end
class RuboCop::Cop::RSpec::Rails::HttpStatus
extend ::RuboCop::Cop::AutoCorrector
end
module RuboCop::Cop::RSpec::Rails
end
module RuboCop::RSpec::ExpectOffense
def expect_correction(correction, loop: T.unsafe(nil)); end

View File

@ -74,13 +74,13 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-static-0.5.612
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-0.5.6124/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-sorbet-1.7.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.2.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.3.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.7.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.3.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.9.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.8.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.0.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.0.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.5.1/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.5.0/lib"
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/sorbet-runtime-stub-0.2.0/lib"

View File

@ -1,85 +1,85 @@
---
RSpec:
Include:
- "**/*_spec.rb"
- "**/spec/**/*"
- "**/*_spec.rb"
- "**/spec/**/*"
Language:
ExampleGroups:
Regular:
- describe
- context
- feature
- example_group
- describe
- context
- feature
- example_group
Skipped:
- xdescribe
- xcontext
- xfeature
- xdescribe
- xcontext
- xfeature
Focused:
- fdescribe
- fcontext
- ffeature
- fdescribe
- fcontext
- ffeature
Examples:
Regular:
- it
- specify
- example
- scenario
- its
- it
- specify
- example
- scenario
- its
Focused:
- fit
- fspecify
- fexample
- fscenario
- focus
- fit
- fspecify
- fexample
- fscenario
- focus
Skipped:
- xit
- xspecify
- xexample
- xscenario
- skip
- xit
- xspecify
- xexample
- xscenario
- skip
Pending:
- pending
- pending
Expectations:
- expect
- is_expected
- expect_any_instance_of
- expect
- is_expected
- expect_any_instance_of
Helpers:
- let
- let!
- let
- let!
Hooks:
- prepend_before
- before
- append_before
- around
- prepend_after
- after
- append_after
- prepend_before
- before
- append_before
- around
- prepend_after
- after
- append_after
HookScopes:
- each
- example
- context
- all
- suite
- each
- example
- context
- all
- suite
Includes:
Examples:
- it_behaves_like
- it_should_behave_like
- include_examples
- it_behaves_like
- it_should_behave_like
- include_examples
Context:
- include_context
- include_context
Runners:
- to
- to_not
- not_to
- to
- to_not
- not_to
SharedGroups:
Examples:
- shared_examples
- shared_examples_for
- shared_examples
- shared_examples_for
Context:
- shared_context
- shared_context
Subjects:
- subject
- subject!
- subject
- subject!
RSpec/AlignLeftLetBrace:
Description: Checks that left braces for adjacent single line lets are aligned.
@ -121,9 +121,9 @@ RSpec/BeforeAfterAll:
Description: Check that before/after(:all) isn't being used.
Enabled: true
Exclude:
- spec/spec_helper.rb
- spec/rails_helper.rb
- spec/support/**/*.rb
- spec/spec_helper.rb
- spec/rails_helper.rb
- spec/support/**/*.rb
VersionAdded: '1.12'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeforeAfterAll
@ -137,9 +137,9 @@ RSpec/ContextWording:
Description: Checks that `context` docstring starts with an allowed prefix.
Enabled: true
Prefixes:
- when
- with
- without
- when
- with
- without
VersionAdded: '1.20'
VersionChanged: 1.20.1
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ContextWording
@ -149,19 +149,19 @@ RSpec/DescribeClass:
Enabled: true
IgnoredMetadata:
type:
- channel
- controller
- helper
- job
- mailer
- model
- request
- routing
- view
- feature
- system
- mailbox
- aruba
- channel
- controller
- helper
- job
- mailer
- model
- request
- routing
- view
- feature
- system
- mailbox
- aruba
VersionAdded: '1.0'
VersionChanged: '1.44'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribeClass
@ -184,8 +184,8 @@ RSpec/DescribedClass:
SkipBlocks: false
EnforcedStyle: described_class
SupportedStyles:
- described_class
- explicit
- described_class
- explicit
SafeAutoCorrect: false
VersionAdded: '1.0'
VersionChanged: '1.11'
@ -260,9 +260,9 @@ RSpec/ExampleWithoutDescription:
Enabled: true
EnforcedStyle: always_allow
SupportedStyles:
- always_allow
- single_line_only
- disallow
- always_allow
- single_line_only
- disallow
VersionAdded: '1.22'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWithoutDescription
@ -283,7 +283,7 @@ RSpec/ExpectActual:
Description: Checks for `expect(...)` calls containing literal values.
Enabled: true
Exclude:
- spec/routing/**/*
- spec/routing/**/*
VersionAdded: '1.7'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectActual
@ -292,8 +292,8 @@ RSpec/ExpectChange:
Enabled: true
EnforcedStyle: method_call
SupportedStyles:
- method_call
- block
- method_call
- block
VersionAdded: '1.22'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange
@ -313,8 +313,8 @@ RSpec/FilePath:
Description: Checks that spec file paths are consistent and well-formed.
Enabled: true
Include:
- "**/*_spec*rb*"
- "**/spec/**/*"
- "**/*_spec*rb*"
- "**/spec/**/*"
CustomTransform:
RuboCop: rubocop
RSpec: rspec
@ -335,9 +335,9 @@ RSpec/HookArgument:
Enabled: true
EnforcedStyle: implicit
SupportedStyles:
- implicit
- each
- example
- implicit
- each
- example
VersionAdded: '1.7'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HookArgument
@ -358,8 +358,8 @@ RSpec/ImplicitExpect:
Enabled: true
EnforcedStyle: is_expected
SupportedStyles:
- is_expected
- should
- is_expected
- should
VersionAdded: '1.8'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
@ -368,9 +368,9 @@ RSpec/ImplicitSubject:
Enabled: true
EnforcedStyle: single_line_only
SupportedStyles:
- single_line_only
- single_statement_only
- disallow
- single_line_only
- single_statement_only
- disallow
VersionAdded: '1.29'
VersionChanged: '1.30'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitSubject
@ -394,8 +394,8 @@ RSpec/ItBehavesLike:
Enabled: true
EnforcedStyle: it_behaves_like
SupportedStyles:
- it_behaves_like
- it_should_behave_like
- it_behaves_like
- it_should_behave_like
VersionAdded: '1.13'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ItBehavesLike
@ -442,8 +442,8 @@ RSpec/MessageExpectation:
Enabled: false
EnforcedStyle: allow
SupportedStyles:
- allow
- expect
- allow
- expect
VersionAdded: '1.7'
VersionChanged: '1.8'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
@ -453,8 +453,8 @@ RSpec/MessageSpies:
Enabled: true
EnforcedStyle: have_received
SupportedStyles:
- have_received
- receive
- have_received
- receive
VersionAdded: '1.9'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageSpies
@ -512,8 +512,8 @@ RSpec/NotToNot:
Enabled: true
EnforcedStyle: not_to
SupportedStyles:
- not_to
- to_not
- not_to
- to_not
VersionAdded: '1.4'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
@ -536,8 +536,8 @@ RSpec/PredicateMatcher:
EnforcedStyle: inflected
AllowedExplicitMatchers: []
SupportedStyles:
- inflected
- explicit
- inflected
- explicit
SafeAutoCorrect: false
VersionAdded: '1.16'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/PredicateMatcher
@ -589,8 +589,8 @@ RSpec/ReturnFromStub:
Enabled: true
EnforcedStyle: and_return
SupportedStyles:
- and_return
- block
- and_return
- block
VersionAdded: '1.16'
VersionChanged: '1.22'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ReturnFromStub
@ -650,8 +650,8 @@ RSpec/VariableDefinition:
Enabled: true
EnforcedStyle: symbols
SupportedStyles:
- symbols
- strings
- symbols
- strings
VersionAdded: '1.40'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/VariableDefinition
@ -660,8 +660,8 @@ RSpec/VariableName:
Enabled: true
EnforcedStyle: snake_case
SupportedStyles:
- snake_case
- camelCase
- snake_case
- camelCase
IgnoredPatterns: []
VersionAdded: '1.40'
VersionChanged: '1.43'
@ -714,9 +714,9 @@ RSpec/FactoryBot/AttributeDefinedStatically:
Description: Always declare attribute values as blocks.
Enabled: true
Include:
- spec/factories.rb
- spec/factories/**/*.rb
- features/support/factories/**/*.rb
- spec/factories.rb
- spec/factories/**/*.rb
- features/support/factories/**/*.rb
VersionAdded: '1.28'
VersionChanged: '2.0'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
@ -725,15 +725,15 @@ RSpec/FactoryBot/CreateList:
Description: Checks for create_list usage.
Enabled: true
Include:
- "**/*_spec.rb"
- "**/spec/**/*"
- spec/factories.rb
- spec/factories/**/*.rb
- features/support/factories/**/*.rb
- "**/*_spec.rb"
- "**/spec/**/*"
- spec/factories.rb
- spec/factories/**/*.rb
- features/support/factories/**/*.rb
EnforcedStyle: create_list
SupportedStyles:
- create_list
- n_times
- create_list
- n_times
VersionAdded: '1.25'
VersionChanged: '2.0'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/CreateList
@ -742,9 +742,9 @@ RSpec/FactoryBot/FactoryClassName:
Description: Use string value when setting the class attribute explicitly.
Enabled: true
Include:
- spec/factories.rb
- spec/factories/**/*.rb
- features/support/factories/**/*.rb
- spec/factories.rb
- spec/factories/**/*.rb
- features/support/factories/**/*.rb
VersionAdded: '1.37'
VersionChanged: '2.0'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/FactoryClassName
@ -754,8 +754,8 @@ RSpec/Rails/HttpStatus:
Enabled: true
EnforcedStyle: symbolic
SupportedStyles:
- numeric
- symbolic
- numeric
- symbolic
VersionAdded: '1.23'
VersionChanged: '2.0'
StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Rails/HttpStatus

View File

@ -27,7 +27,7 @@ module RuboCop
# end
class AroundBlock < Base
MSG_NO_ARG = 'Test object should be passed to around block.'
MSG_UNUSED_ARG = 'You should call `%<arg>s.call` '\
MSG_UNUSED_ARG = 'You should call `%<arg>s.call` ' \
'or `%<arg>s.run`.'
def_node_matcher :hook, <<-PATTERN

View File

@ -20,7 +20,7 @@ module RuboCop
# expect(foo).to be(true)
#
class Be < Base
MSG = 'Don\'t use `be` without an argument.'
MSG = "Don't use `be` without an argument."
def_node_matcher :be_without_args, <<-PATTERN
(send _ #Runners.all $(send nil? :be))

View File

@ -24,9 +24,9 @@ module RuboCop
# after(:each) { Widget.delete_all }
# end
class BeforeAfterAll < Base
MSG = 'Beware of using `%<hook>s` as it may cause state to leak '\
'between tests. If you are using `rspec-rails`, and '\
'`use_transactional_fixtures` is enabled, then records created '\
MSG = 'Beware of using `%<hook>s` as it may cause state to leak ' \
'between tests. If you are using `rspec-rails`, and ' \
'`use_transactional_fixtures` is enabled, then records created ' \
'in `%<hook>s` are not automatically rolled back.'
def_node_matcher :before_or_after_all, <<-PATTERN

View File

@ -37,7 +37,7 @@ module RuboCop
class DescribeClass < Base
include TopLevelGroup
MSG = 'The first argument to describe should be '\
MSG = 'The first argument to describe should be ' \
'the class or module being tested.'
def_node_matcher :example_group_with_ignored_metadata?, <<~PATTERN

View File

@ -19,7 +19,7 @@ module RuboCop
class DescribeMethod < Base
include TopLevelGroup
MSG = 'The second argument to describe should be the method '\
MSG = 'The second argument to describe should be the method ' \
"being tested. '#instance' or '.class'."
def_node_matcher :second_argument, <<~PATTERN

View File

@ -60,6 +60,7 @@ module RuboCop
expect_literal(node) do |actual, matcher, expected|
add_offense(actual.source_range) do |corrector|
next unless SUPPORTED_MATCHERS.include?(matcher)
next if literal?(expected)
swap(corrector, actual, expected)
end

View File

@ -15,7 +15,7 @@ module RuboCop
# # good
# expect { my_app.print_report }.to output('Hello World').to_stdout
class ExpectOutput < Base
MSG = 'Use `expect { ... }.to output(...).to_%<name>s` '\
MSG = 'Use `expect { ... }.to output(...).to_%<name>s` ' \
'instead of mutating $%<name>s.'
def on_gvasgn(node)

View File

@ -21,7 +21,7 @@ module RuboCop
class InstanceSpy < Base
extend AutoCorrector
MSG = 'Use `instance_spy` when you check your double '\
MSG = 'Use `instance_spy` when you check your double ' \
'with `have_received`.'
def_node_search :null_double, <<-PATTERN

View File

@ -22,7 +22,7 @@ module RuboCop
extend AutoCorrector
include ConfigurableEnforcedStyle
MSG = 'Prefer `%<replacement>s` over `%<original>s` when including '\
MSG = 'Prefer `%<replacement>s` over `%<original>s` when including ' \
'examples in a nested context.'
def_node_matcher :example_inclusion_offense, '(send _ % ...)'

View File

@ -17,7 +17,7 @@ module RuboCop
# end
class IteratedExpectation < Base
MSG = 'Prefer using the `all` matcher instead ' \
'of iterating over an array.'
'of iterating over an array.'
def_node_matcher :each?, <<-PATTERN
(block

View File

@ -29,8 +29,8 @@ module RuboCop
MSG_RECEIVE = 'Prefer `receive` for setting message expectations.'
MSG_HAVE_RECEIVED = 'Prefer `have_received` for setting message '\
'expectations. Setup `%<source>s` as a spy using '\
MSG_HAVE_RECEIVED = 'Prefer `have_received` for setting message ' \
'expectations. Setup `%<source>s` as a spy using ' \
'`allow` or `instance_spy`.'
SUPPORTED_STYLES = %w[have_received receive].freeze

View File

@ -25,8 +25,7 @@ module RuboCop
class MultipleDescribes < Base
include TopLevelGroup
MSG = 'Do not use multiple top-level example groups - '\
'try to nest them.'
MSG = 'Do not use multiple top-level example groups - try to nest them.'
def on_top_level_group(node)
top_level_example_groups =

View File

@ -23,7 +23,7 @@ module RuboCop
# end
#
class ScatteredSetup < Base
MSG = 'Do not define multiple `%<hook_name>s` hooks in the same '\
MSG = 'Do not define multiple `%<hook_name>s` hooks in the same ' \
'example group (also defined on %<lines>s).'
def on_block(node)

View File

@ -53,11 +53,8 @@ module RuboCop
class SharedContext < Base
extend AutoCorrector
MSG_EXAMPLES = "Use `shared_examples` when you don't "\
'define context.'
MSG_CONTEXT = "Use `shared_context` when you don't "\
'define examples.'
MSG_EXAMPLES = "Use `shared_examples` when you don't define context."
MSG_CONTEXT = "Use `shared_context` when you don't define examples."
def_node_search :examples?,
send_pattern('{#Includes.examples #Examples.all}')

View File

@ -19,7 +19,7 @@ module RuboCop
class SingleArgumentMessageChain < Base
extend AutoCorrector
MSG = 'Use `%<recommended>s` instead of calling '\
MSG = 'Use `%<recommended>s` instead of calling ' \
'`%<called>s` with a single argument.'
def_node_matcher :message_chain, <<-PATTERN

View File

@ -13,11 +13,21 @@ module RuboCop
#
# @example
# # bad
# describe Foo do
# subject(:bar) { baz }
# describe Article do
# subject(:article) { Article.new }
#
# before do
# allow(bar).to receive(:qux?).and_return(true)
# it 'indicates that the author is unknown' do
# allow(article).to receive(:author).and_return(nil)
# expect(article.description).to include('by an unknown author')
# end
# end
#
# # good
# describe Article do
# subject(:article) { Article.new(author: nil) }
#
# it 'indicates that the author is unknown' do
# expect(article.description).to include('by an unknown author')
# end
# end
#

Some files were not shown because too many files have changed in this diff Show More