expertiza/expertiza

View on GitHub
spec/models/sign_up_sheet_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage

Block has too many lines. [45/25]
Open

describe SignUpSheet do
  describe '.add_signup_topic' do
    it 'will return an empty Hash when there are no topics' do
      assignment = double('Assignment')
      allow(assignment).to receive(:num_review_rounds) { nil }
Severity: Minor
Found in spec/models/sign_up_sheet_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.

Block has too many lines. [43/25]
Open

  describe '.add_signup_topic' do
    it 'will return an empty Hash when there are no topics' do
      assignment = double('Assignment')
      allow(assignment).to receive(:num_review_rounds) { nil }
      allow(Assignment).to receive(:find) { assignment }
Severity: Minor
Found in spec/models/sign_up_sheet_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.

Block has too many lines. [37/25]
Open

describe '.confirm_topic' do
  before(:each) do
    allow(SignedUpTeam).to receive(:find_team_users).and_return([TeamsUser.new])
    allow_any_instance_of(TeamsUser).to receive(:t_id).and_return(1)
    allow(Team).to receive(:find).and_return(Team.new)
Severity: Minor
Found in spec/models/sign_up_sheet_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.

Trailing whitespace detected.
Open

  end  
Severity: Minor
Found in spec/models/sign_up_sheet_spec.rb by rubocop

Use snake_case for variable names.
Open

      deadlineType = double('DeadlineType')
Severity: Minor
Found in spec/models/sign_up_sheet_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

      deadlineType = double(DeadlineType)
Severity: Minor
Found in spec/models/sign_up_sheet_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

Prefer Date or Time over DateTime.
Open

      assignment_due_date.due_at = DateTime.new(2000, 1, 1)
Severity: Minor
Found in spec/models/sign_up_sheet_spec.rb by rubocop

This cop checks for uses of DateTime that should be replaced by Date or Time.

Example:

# bad - uses `DateTime` for current time
DateTime.now

# good - uses `Time` for current time
Time.now

# bad - uses `DateTime` for modern date
DateTime.iso8601('2016-06-29')

# good - uses `Date` for modern date
Date.iso8601('2016-06-29')

# good - uses `DateTime` with start argument for historical date
DateTime.iso8601('1751-04-23', Date::ENGLAND)

There are no issues that match your filters.

Category
Status