Pedro Paiva
edf4f5d9d0
Remove Rails 4.2 support ( #1422 )
2021-03-04 19:43:38 -03:00
Kapil Sachdev
b7e02184d9
fix(rubocop): Fix Layout/LineLength
...
- bump rubocop to v1.0
- Fix Layout/MultilineAssignmentLayout and other remaining offences
- Exculde appraisal generated gemfiles in rubocop
- Replace NON_NUMERIC_VALUE constant with instance method against
failing test case in rails <= 5.1 and postgres adapter.
This is a defect in rails where a frozen string is modified in
https://github.com/rails/rails/blob/v5.1.7/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb#L25
2020-11-03 10:05:25 -07:00
Kapil Sachdev
3e88500318
fix(rubocop): Fix Style, Layout, Lint and other offenses [ci skip]
...
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
2020-11-03 10:05:25 -07:00
Elliot Winkler
26522c6b78
capture, silence_stream, and silence_stderr were removed in Rails 5
2017-09-17 17:01:50 -05:00
Elliot Winkler
6cc7fd8ca2
Remove warnings shown when running tests
...
* For some reason, ActiveRecord was printing a warning saying that
"active_record/base" was already being loaded and there was a possible
circular dependency. We fix this by explicitly requiring
"active_record/base" before `$VERBOSE` is set to true.
* We were getting warnings when re-defining Kernel.capture,
Kernel.silence_stream and Kernel.silence_stderr, so undefine them
first.
2015-12-13 20:22:21 -07:00
Elliot Winkler
c49241601f
Remove warning about #capture under 4.2+
2014-12-25 00:45:06 -05:00
Elliot Winkler
bbdf8a807e
Reorganize unit tests, part I
...
* Move spec/shoulda to spec/unit_tests/shoulda
* Move spec/support/*.rb to spec/support/unit_tests/{helpers,matchers}
* Move spec_helper.rb to unit_spec_helper.rb
2014-11-04 14:43:59 -07:00