mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
3e88500318
Updated Layout/LineLength cop to Max 120 lenght and ignore everything inside specs/**/* Added rules for below cops in .rubocop.yml Lint/AmbiguousBlockAssociation Naming/HeredocDelimiterNaming Rails/SkipsModelValidations Style/FormatStringToken Fixed below mentioned cops: - Layout/CaseIndentation - Layout/DotPosition - Layout/ElseAlignment - Layout/IndentationWidth - Layout/LineLength - Layout/MultilineBlockLayout - Layout/MultilineOperationIndentation - Lint/AmbiguousBlockAssociation - Lint/MissingCopEnableDirective - Lint/NestedMethodDefinition - Lint/RedundantCopDisableDirective - Lint/RedundantRequireStatement - Lint/UnusedBlockArgument - Lint/UnusedMethodArgument - Metrics/ModuleLength - Naming/MemoizedInstanceVariableName - Naming/RescuedExceptionsVariableName - Rails/Output - Rails/Presence - Security/Eval - Security/Open - Style/ClassCheck - Style/CollectionMethods - Style/ConditionalAssignment - Style/EvalWithLocation - Style/FormatStringToken - Style/InverseMethods - Style/MutableConstant - Style/ParallelAssignment - Style/RedundantBegin - Style/RedundantCondition - Style/RedundantInterpolation - Style/RedundantSelf - Style/RedundantSort - Style/RescueStandardError - Style/SafeNavigation - Style/StringLiteralsInInterpolation - Style/SymbolProc
31 lines
744 B
Ruby
31 lines
744 B
Ruby
module Shoulda
|
|
module Matchers
|
|
module Integrations
|
|
module Libraries
|
|
# @private
|
|
class Rails
|
|
Integrations.register_library(self, :rails)
|
|
|
|
include Integrations::Rails
|
|
|
|
SUB_LIBRARIES = [
|
|
:active_model,
|
|
:active_record,
|
|
:action_controller,
|
|
:routing,
|
|
].freeze
|
|
|
|
def integrate_with(test_framework)
|
|
Shoulda::Matchers.assertion_exception_class =
|
|
ActiveSupport::TestCase::Assertion
|
|
|
|
SUB_LIBRARIES.each do |name|
|
|
library = Integrations.find_library!(name)
|
|
library.integrate_with(test_framework)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|