expertiza/expertiza

View on GitHub
spec/models/lock_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage

Block has too many lines. [72/25]
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
Severity: Minor
Found in spec/models/lock_spec.rb by rubocop

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

      firstLock = Lock.find_by(user: @smyoder, lockable: @response)
Severity: Minor
Found in spec/models/lock_spec.rb by rubocop

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

      secondLock = Lock.find_by(user: @smyoder, lockable: @response)
Severity: Minor
Found in spec/models/lock_spec.rb by rubocop

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

There are no issues that match your filters.

Category
Status