1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
Commit graph

5 commits

Author SHA1 Message Date
Geoff Hubbard
4303e7d0d7 Remove unused _include_private argument
The implementation of respond_to? here is independent of the
implementation on Object which uses the include_private argument.

In this implementation the _include_private argument can and will never be used.

So remove it from the code.
2020-06-02 12:18:04 -04:00
Geoff Hubbard
a887d3d2eb Remove unused method respond_to_missing?
NullObject inherits from BasicObject.

BasicObject does not implement respond_to? or respond_to_missing?

Since we're inheriting from BasicObject we don't implement respond_to
and respond_to_missing? in the same way as we would if we were
inheriting from Object

Since respond_to_missing? will never be called, we can delete the unused
code.

In order to stop Rubocop complaining about this we need to disable the
Style/MissingRespondToMissing cop.

References:
https://ruby-doc.org/core-2.7.1/BasicObject.html
2020-06-02 12:18:04 -04:00
Hunter Braun
6a25e989b6 [Rubocop] Lint Cop Offenses (#1207) 2018-10-05 14:54:08 -04:00
Colin Ross
a56b68bc9c Fix assorted RuboCop spacing volations (#1203)
* Alphabetize gem listing in various Gemfiles [Rubocop Bundler/OrderedGems]

* Fix alignment of if/else/end statement [Rubocop Layout/ElseAlignment]

* Method definitions should have a empty line between them [Rubocop Layout/EmptyLineBetweenDefs]

* Modules, Classes, and blocks should have an empty line around them [Rubocop]

Cops:
Layout/EmptyLinesAroundBlockBody
Layout/EmptyLinesAroundModuleBody
Layout/EmptyLinesAroundClassBody
Layout/EmptyLinesAroundAccessModifier

* Keep a blank line before and after access modifiers [Rubocop Layout/EmptyLinesAroundAccessModifier]

* Remove misc extra whitespace [Rubocop Layout/ExtraSpacing]

* Indent the first line of the right-hand-side of a multi-line assignment [Rubocop Layout/IndentAssignment]

* Remove extraneous whitespace [Rubocop]

Cops:
  Layout/IndentationWidth
  Layout/LeadingCommentSpace
  Layout/SpaceAroundEqualsInParameterDefault
  Layout/SpaceInsideArrayLiteralBrackets
  Layout/SpaceInsideBlockBraces
  Layout/SpaceInsideParens
  Layout/TrailingBlankLines

* Revert rubocop changes to gemfiles; exclude files from rubocop checks

The files in gemfiles/ are generated by Appraisal, so we shouldn't edit them. Instead, let's tell RuboCop to exclude this directory.
2018-09-27 21:35:05 -04:00
Avielle
c716ce01b4 Replace 'girl' with 'bot' everywhere (#1051)
Also: add a deprecation warning to factory_girl, asking users to switch to
factory_bot

https://github.com/thoughtbot/factory_girl/issues/921
2017-10-20 15:20:28 -04:00
Renamed from lib/factory_girl/null_object.rb (Browse further)