Commit Graph

6 Commits

Author SHA1 Message Date
Kapil Sachdev ee1008de7a fix(rubocop): Fix Layout related offenses [ci skip]
- Layout/EmptyLines
- Layout/EmptyLineAfterGuardClause
- Layout/TrailingEmptyLines
- Layout/EmptyLinesAroundBlockBody
- Layout/EmptyLinesAroundModuleBody
- Layout/EmptyLineAfterMagicComment
- Layout/SpaceInsidePercentLiteralDelimiters
- Layout/SpaceAroundEqualsInParameterDefault
- Layout/SpaceInsideArrayLiteralBrackets
- Layout/LeadingCommentSpace
- Layout/SpaceBeforeComment
- Layout/SpaceAroundOperators
- Layout/SpaceInsideRangeLiteral
- Layout/SpaceInsideReferenceBrackets
- Layout/SpaceInLambdaLiteral
- Layout/SpaceAfterComma
- Layout/SpaceInsideHashLiteralBraces
- Layout/TrailingWhitespace
- Layout/ArgumentAlignment
- Layout/HashAlignment
- Layout/DotPosition
- Layout/IndentationWidth
- Layout/EndAlignment
- Layout/MultilineOperationIndentation
- Layout/IndentationConsistency
- Layout/ClosingHeredocIndentation
- Layout/MultilineMethodCallBrace- Layout
- Layout/ClosingParenthesisIndentation
2020-11-03 10:05:25 -07:00
Elliot Winkler c32ec3aec5 Remove some more warnings coming from Ruby 2017-09-17 17:01:50 -05:00
Elliot Winkler e11891e818 Rewrite the tests for #permit
* Use `permit` directly instead of manually building the matcher
* Some tests were being tested by calling #matches? directly when they
  shouldn't have been, and some tests were duplicated
* Rename helper methods that define controllers to express intent better
* Don't make a global class (SimulatedError), keep the class local to
  the example group
* Use lambdas for that use `raise_error`
2015-02-28 23:41:01 -07:00
Elliot Winkler fab4f02da3 Fix AC matcher tests for Rails 4.2
Modify helper methods provided by ControllerBuilder so that we use as
much of rspec-rails's controller example group capabilities as possible.
All of this can still be improved but this is a good start for now.
2014-12-25 00:45:04 -05:00
Elliot Winkler f922613386 Reorganize unit tests, part II
* Change 'spec' Rake task to 'spec:unit'
* Require unit_spec_helper.rb in unit tests, not spec_helper.rb
* Re-namespace files in spec/support/unit under UnitTests
* Files in spec/support/unit/helpers no longer automatically add
  themselves to RSpec - this happens in unit_spec_helper.rb
* Extract RecordWithDifferentErrorAttributeBuilder and
  RecordValidatingConfirmationBuilder to separate files
2014-11-05 09:53:20 -07: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