spec/models/lock_spec.rb
Block has too many lines. [72/25] Open
Open
describe Lock do
# Locks interact with the database. Since we want to check database values, we need to use the database
before(:each) do
# I was unable to use regular create! calls for user.
# I think this might be because the writers of user.rb overrode User.initialize
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Use snake_case for variable names. Open
Open
firstLock = Lock.find_by(user: @smyoder, lockable: @response)
- Read upRead up
- Exclude checks
This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.
Example: EnforcedStyle: snake_case (default)
# bad
fooBar = 1
# good
foo_bar = 1
Example: EnforcedStyle: camelCase
# bad
foo_bar = 1
# good
fooBar = 1
Use snake_case for variable names. Open
Open
secondLock = Lock.find_by(user: @smyoder, lockable: @response)
- Read upRead up
- Exclude checks
This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.
Example: EnforcedStyle: snake_case (default)
# bad
fooBar = 1
# good
foo_bar = 1
Example: EnforcedStyle: camelCase
# bad
foo_bar = 1
# good
fooBar = 1