expertiza/expertiza

View on GitHub
spec/models/assignment_form_spec.rb

Summary

Maintainability
F
1 wk
Test Coverage

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

describe AssignmentForm do
  let(:assignment) { build(:assignment, id: 1) }
  let(:due_date) { build(:assignment_due_date) }
  let(:assignment_form) { AssignmentForm.new }
  let(:user) { double('Instructor', timezonepref: 'Eastern Time (US & Canada)') }
Severity: Minor
Found in spec/models/assignment_form_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. [410/25]
Open

  describe '#update_assignment_questionnaires' do
    context 'when attributes are nil or empty' do
      it 'returns nil' do
        expect(assignment_form.update_assignment_questionnaires(nil)).to eq(nil)
        expect(assignment_form.update_assignment_questionnaires([])).to eq(nil)
Severity: Minor
Found in spec/models/assignment_form_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. [212/25]
Open

    context 'when attributes are not nil and received from Rubrics' do
      let(:attributes) { [aq_attributes1, aq_attributes2] }

      before(:each) do
        allow(assignment_questionnaire1).to receive(:questionnaire_id).and_return(1)
Severity: Minor
Found in spec/models/assignment_form_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. [188/25]
Open

    context 'when attributes are not nil and received from Topics tab' do
      let(:attributes) { [aq_attributes1, aq_attributes2] }

      before(:each) do
        allow(assignment_questionnaire1).to receive(:questionnaire_id).and_return(1)
Severity: Minor
Found in spec/models/assignment_form_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.

File assignment_form_spec.rb has 740 lines of code (exceeds 250 allowed). Consider refactoring.
Open

describe AssignmentForm do
  let(:assignment) { build(:assignment, id: 1) }
  let(:due_date) { build(:assignment_due_date) }
  let(:assignment_form) { AssignmentForm.new }
  let(:user) { double('Instructor', timezonepref: 'Eastern Time (US & Canada)') }
Severity: Major
Found in spec/models/assignment_form_spec.rb - About 1 day to fix

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

      describe '#assignment_questionnaire' do
        context 'when multiple active records of assignment_questionnaire are found for a given assignment_id, used_in_round, and topic_id' do
          it 'returns correct assignment questionnaire found by questionnaire type' do
            allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: 1).and_return(
              [assignment_questionnaire1, assignment_questionnaire2]
    Severity: Minor
    Found in spec/models/assignment_form_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. [47/25]
    Open

          context 'when active record assignment_questionnaire exists but assignment_questionnaire2 does not exist' do
            before(:each) do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
                [assignment_questionnaire1]
    Severity: Minor
    Found in spec/models/assignment_form_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. [41/25]
    Open

          context 'when active record assignment_questionnaire exists but assignment_questionnaire2 does not exist' do
            before(:each) do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
                [assignment_questionnaire1]
    Severity: Minor
    Found in spec/models/assignment_form_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. [41/25]
    Open

          context 'when active record assignment_questionnaire does not exist but assignment_questionnaire2 exists' do
            before(:each) do
              allow(assignment_questionnaire2).to receive(:id).and_return(2)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
                [assignment_questionnaire2]
    Severity: Minor
    Found in spec/models/assignment_form_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

          context 'when both active records exist and can be found' do
            before(:each) do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(assignment_questionnaire2).to receive(:id).and_return(2)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
    Severity: Minor
    Found in spec/models/assignment_form_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. [35/25]
    Open

          context 'when active record assignment_questionnaire does not exist but assignment_questionnaire2 exists' do
            before(:each) do
              allow(assignment_questionnaire2).to receive(:id).and_return(2)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
                [assignment_questionnaire2]
    Severity: Minor
    Found in spec/models/assignment_form_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. [33/25]
    Open

      describe '#update_due_dates' do
        context 'when attributes are nil' do
          it 'returns false' do
            expect(assignment_form.update_due_dates(nil, user)).to be false
          end
    Severity: Minor
    Found in spec/models/assignment_form_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. [31/25]
    Open

          context 'when both active records exist and can be found' do
            before(:each) do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(assignment_questionnaire2).to receive(:id).and_return(2)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
    Severity: Minor
    Found in spec/models/assignment_form_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. [30/25]
    Open

          context 'when neither of active record exists' do
            before(:each) do
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return([])
              allow(AssignmentQuestionnaire).to receive(:where).with(user_id: anything, assignment_id: nil, questionnaire_id: nil).and_return([])
              allow(AssignmentQuestionnaire).to receive(:new).and_return(assignment_questionnaire1)
    Severity: Minor
    Found in spec/models/assignment_form_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. [30/25]
    Open

      describe '#add_to_delayed_queue' do
        before(:each) do
          allow(AssignmentDueDate).to receive(:where).with(parent_id: 1).and_return([due_date])
          allow_any_instance_of(AssignmentForm).to receive(:find_min_from_now).with(any_args).and_return(666)
          allow(due_date).to receive(:update_attribute).with(:delayed_job_id, any_args).and_return('Succeed!')
    Severity: Minor
    Found in spec/models/assignment_form_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. [26/25]
    Open

          context 'when questionnaire_id is not given within attributes' do
            it 'returns attributes (args) and does not change @has_errors value when both attributes do not have questionnaire_id specified' do
              allow(aq_attributes1).to receive(:[]).with(:questionnaire_id).and_return('')
              allow(aq_attributes2).to receive(:[]).with(:questionnaire_id).and_return('')
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Minor
    Found in spec/models/assignment_form_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. [26/25]
    Open

          context 'when questionnaire_id is not given within attributes' do
            it 'returns attributes (args) and does not change @has_errors value when both attributes do not have questionnaire_id specified' do
              allow(aq_attributes1).to receive(:[]).with(:questionnaire_id).and_return('')
              allow(aq_attributes2).to receive(:[]).with(:questionnaire_id).and_return('')
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Minor
    Found in spec/models/assignment_form_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. [26/25]
    Open

        context 'when attributes are not nil and at least one due_date\'s id is nil or blank' do
          let(:due_date2) { { due_at: '2015-06-22 12:05:00 -0400' } }
          let(:due_date3) { { id: 1, due_at: '2015-06-22 12:05:00 -0400' } }
          let(:attributes) { [due_date2, due_date3] }
          before(:each) do
    Severity: Minor
    Found in spec/models/assignment_form_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.

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

          context 'when questionnaire_id is not given within attributes' do
            it 'returns attributes (args) and does not change @has_errors value when both attributes do not have questionnaire_id specified' do
              allow(aq_attributes1).to receive(:[]).with(:questionnaire_id).and_return('')
              allow(aq_attributes2).to receive(:[]).with(:questionnaire_id).and_return('')
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 4 hrs to fix
    spec/models/assignment_form_spec.rb on lines 286..313

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 152.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

          context 'when questionnaire_id is not given within attributes' do
            it 'returns attributes (args) and does not change @has_errors value when both attributes do not have questionnaire_id specified' do
              allow(aq_attributes1).to receive(:[]).with(:questionnaire_id).and_return('')
              allow(aq_attributes2).to receive(:[]).with(:questionnaire_id).and_return('')
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 4 hrs to fix
    spec/models/assignment_form_spec.rb on lines 500..527

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 152.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      describe '#staggered_deadline' do
        context 'when current assignment.staggered_deadlines is nil' do
          it 'sets staggered_deadline attribute of current assignment to false' do
            assignment.staggered_deadline = nil
            expect(assignment_form.staggered_deadline).to be false
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 727..740
    spec/models/assignment_form_spec.rb on lines 745..758
    spec/models/assignment_form_spec.rb on lines 763..776

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 57.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      describe '#micro_task' do
        context 'when current assignment.microtask is nil' do
          it 'sets microtask attribute of current assignment to false' do
            assignment.microtask = nil
            expect(assignment_form.micro_task).to be false
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 709..722
    spec/models/assignment_form_spec.rb on lines 727..740
    spec/models/assignment_form_spec.rb on lines 763..776

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 57.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      describe '#reviews_visible_to_all' do
        context 'when current assignment.reviews_visible_to_all is nil' do
          it 'sets reviews_visible_to_all attribute of current assignment to false' do
            assignment.reviews_visible_to_all = nil
            expect(assignment_form.reviews_visible_to_all).to be false
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 709..722
    spec/models/assignment_form_spec.rb on lines 727..740
    spec/models/assignment_form_spec.rb on lines 745..758

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 57.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire1' do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(false)
              allow(assignment_questionnaire2).to receive(:id).and_return(nil)
              allow(assignment_questionnaire2).to receive(:save).and_return(true)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 417..424

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 57.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire1' do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(false)
              allow(assignment_questionnaire2).to receive(:id).and_return(nil)
              allow(assignment_questionnaire2).to receive(:save).and_return(true)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 182..189

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 57.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      describe '#availability_flag' do
        context 'when current assignment.availability_flag is nil' do
          it 'sets availability_flag attribute of current assignment to false' do
            assignment.availability_flag = nil
            expect(assignment_form.availability_flag).to be false
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 709..722
    spec/models/assignment_form_spec.rb on lines 745..758
    spec/models/assignment_form_spec.rb on lines 763..776

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 57.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire2' do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:id).and_return(nil)
              allow(assignment_questionnaire2).to receive(:save).and_return(true)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 407..414

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 57.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire2' do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:id).and_return(nil)
              allow(assignment_questionnaire2).to receive(:save).and_return(true)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 172..179

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 57.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        context 'when the deadline type is review' do
          it 'adds two delayed jobs and changes the # of DelayedJob by 2' do
            allow(DeadlineType).to receive(:find).with(1).and_return(double('DeadlineType', name: 'review'))
            Sidekiq::Testing.fake!
            Sidekiq::RetrySet.new.clear
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 593..602

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        context 'when the deadline type is team formation and current assignment is team-based assignment' do
          it 'adds a delayed job and changes the # of DelayedJob by 2' do
            allow(DeadlineType).to receive(:find).with(1).and_return(double('DeadlineType', name: 'team_formation'))
            Sidekiq::Testing.fake!
            Sidekiq::RetrySet.new.clear
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 580..589

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since save method works incorrectly for assignment_questionnaire2' do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:id).and_return(nil)
              allow(assignment_questionnaire2).to receive(:save).and_return(false)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 398..404

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since save method works incorrectly for assignment_questionnaire2' do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:id).and_return(nil)
              allow(assignment_questionnaire2).to receive(:save).and_return(false)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 1 hr to fix
    spec/models/assignment_form_spec.rb on lines 163..169

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            before(:each) do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
                [assignment_questionnaire1]
              )
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 55 mins to fix
    spec/models/assignment_form_spec.rb on lines 146..152
    spec/models/assignment_form_spec.rb on lines 201..207
    spec/models/assignment_form_spec.rb on lines 429..435

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 46.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            before(:each) do
              allow(assignment_questionnaire2).to receive(:id).and_return(2)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
                [assignment_questionnaire2]
              )
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 55 mins to fix
    spec/models/assignment_form_spec.rb on lines 146..152
    spec/models/assignment_form_spec.rb on lines 201..207
    spec/models/assignment_form_spec.rb on lines 381..387

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 46.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            before(:each) do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
                [assignment_questionnaire1]
              )
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 55 mins to fix
    spec/models/assignment_form_spec.rb on lines 201..207
    spec/models/assignment_form_spec.rb on lines 381..387
    spec/models/assignment_form_spec.rb on lines 429..435

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 46.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            before(:each) do
              allow(assignment_questionnaire2).to receive(:id).and_return(2)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
                [assignment_questionnaire2]
              )
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 55 mins to fix
    spec/models/assignment_form_spec.rb on lines 146..152
    spec/models/assignment_form_spec.rb on lines 381..387
    spec/models/assignment_form_spec.rb on lines 429..435

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 46.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it 'returns attributes (args) and does not change @has_errors value since save and update_attributes methods work correctly' do
              allow(assignment_questionnaire1).to receive(:save).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 210..215
    spec/models/assignment_form_spec.rb on lines 438..443
    spec/models/assignment_form_spec.rb on lines 477..482

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire2' do
              allow(assignment_questionnaire1).to receive(:save).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(false)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 233..238

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it 'returns attributes (args) and does not change @has_errors value since save and update_attributes methods work correctly' do
              allow(assignment_questionnaire1).to receive(:save).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 210..215
    spec/models/assignment_form_spec.rb on lines 256..261
    spec/models/assignment_form_spec.rb on lines 477..482

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire2' do
              allow(assignment_questionnaire1).to receive(:save).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(false)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 461..466

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire1' do
              allow(assignment_questionnaire1).to receive(:save).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(false)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 453..458

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args) and does not change @has_errors value since save and update_attributes methods work correctly' do
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:save).and_return(true)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 390..395

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it 'returns attributes (args) and does not change @has_errors value since save and update_attributes methods work correctly' do
              allow(assignment_questionnaire1).to receive(:save).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 256..261
    spec/models/assignment_form_spec.rb on lines 438..443
    spec/models/assignment_form_spec.rb on lines 477..482

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args) and does not change @has_errors value since save and update_attributes methods work correctly' do
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:save).and_return(true)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 155..160

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it 'returns attributes (args) and does not change @has_errors value since save and update_attributes methods work correctly' do
              allow(assignment_questionnaire1).to receive(:save).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 210..215
    spec/models/assignment_form_spec.rb on lines 256..261
    spec/models/assignment_form_spec.rb on lines 438..443

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly' do
              allow(assignment_questionnaire1).to receive(:save).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(false)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes2).and_return(false)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 491..496

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly' do
              allow(assignment_questionnaire1).to receive(:save).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(false)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes2).and_return(false)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 270..275

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire1' do
              allow(assignment_questionnaire1).to receive(:save).and_return(true)
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(false)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 50 mins to fix
    spec/models/assignment_form_spec.rb on lines 225..230

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 43.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            before(:each) do
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return([])
              allow(AssignmentQuestionnaire).to receive(:where).with(user_id: anything, assignment_id: nil, questionnaire_id: nil).and_return([])
              allow(AssignmentQuestionnaire).to receive(:new).and_return(assignment_questionnaire1)
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 40 mins to fix
    spec/models/assignment_form_spec.rb on lines 471..474

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 38.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            before(:each) do
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return([])
              allow(AssignmentQuestionnaire).to receive(:where).with(user_id: anything, assignment_id: nil, questionnaire_id: nil).and_return([])
              allow(AssignmentQuestionnaire).to receive(:new).and_return(assignment_questionnaire1)
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 40 mins to fix
    spec/models/assignment_form_spec.rb on lines 250..253

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 38.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire2' do
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(false)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 123..127

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire1' do
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(false)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 358..362

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire1' do
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(false)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 116..120

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it 'returns nil and changes @has_errors value to true since questionnaire_weight fails validation' do
              allow(aq_attributes1).to receive(:[]).with(:questionnaire_weight).and_return(50)
              allow(aq_attributes2).to receive(:[]).with(:questionnaire_weight).and_return(40)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(nil)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 192..196
    spec/models/assignment_form_spec.rb on lines 241..245
    spec/models/assignment_form_spec.rb on lines 278..282

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it 'returns nil and changes @has_errors value to true since questionnaire_weight fails validation' do
              allow(aq_attributes1).to receive(:[]).with(:questionnaire_weight).and_return(50)
              allow(aq_attributes2).to receive(:[]).with(:questionnaire_weight).and_return(40)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(nil)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 137..141
    spec/models/assignment_form_spec.rb on lines 241..245
    spec/models/assignment_form_spec.rb on lines 278..282

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it 'returns nil and changes @has_errors value to true since questionnaire_weight validation fails' do
              allow(aq_attributes1).to receive(:[]).with(:questionnaire_weight).and_return(50)
              allow(aq_attributes2).to receive(:[]).with(:questionnaire_weight).and_return(40)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(nil)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 137..141
    spec/models/assignment_form_spec.rb on lines 192..196
    spec/models/assignment_form_spec.rb on lines 241..245

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly for assignment_questionnaire2' do
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(false)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 365..369

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it 'returns nil and changes @has_errors value to true since questionnaire_weight validation fails' do
              allow(aq_attributes1).to receive(:[]).with(:questionnaire_weight).and_return(50)
              allow(aq_attributes2).to receive(:[]).with(:questionnaire_weight).and_return(40)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(nil)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Major
    Found in spec/models/assignment_form_spec.rb and 3 other locations - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 137..141
    spec/models/assignment_form_spec.rb on lines 192..196
    spec/models/assignment_form_spec.rb on lines 278..282

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly' do
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(false)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(false)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 130..134

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args) and does not change @has_errors value since update_attributes method works correctly' do
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be nil
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 109..113

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args) and does not change @has_errors value since update_attributes method works correctly' do
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(true)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be nil
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 351..355

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since update_attributes method works incorrectly' do
              allow(assignment_questionnaire1).to receive(:update_attributes).with(aq_attributes1).and_return(false)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(false)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 372..376

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 36.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since save method works incorrectly for assignment_questionnaire1' do
              allow(assignment_questionnaire1).to receive(:save).and_return(false)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 446..450

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 34.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since save method works incorrectly for assignment_questionnaire1' do
              allow(assignment_questionnaire1).to receive(:save).and_return(false)
              allow(assignment_questionnaire2).to receive(:update_attributes).with(aq_attributes2).and_return(true)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 35 mins to fix
    spec/models/assignment_form_spec.rb on lines 218..222

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 34.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            before(:each) do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(assignment_questionnaire2).to receive(:id).and_return(2)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
                [assignment_questionnaire1, assignment_questionnaire2]
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 30 mins to fix
    spec/models/assignment_form_spec.rb on lines 101..105

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 32.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            before(:each) do
              allow(assignment_questionnaire1).to receive(:id).and_return(1)
              allow(assignment_questionnaire2).to receive(:id).and_return(2)
              allow(AssignmentQuestionnaire).to receive(:where).with(assignment_id: assignment.id).and_return(
                [assignment_questionnaire1, assignment_questionnaire2]
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 30 mins to fix
    spec/models/assignment_form_spec.rb on lines 343..347

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 32.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since save method works incorrectly' do
              allow(assignment_questionnaire1).to receive(:save).and_return(false)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 15 mins to fix
    spec/models/assignment_form_spec.rb on lines 264..267

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 25.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            it 'returns attributes (args), but changes @has_errors value to true since save method works incorrectly' do
              allow(assignment_questionnaire1).to receive(:save).and_return(false)
              expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
              expect(assignment_form.instance_variable_get(:@has_errors)).to be true
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb and 1 other location - About 15 mins to fix
    spec/models/assignment_form_spec.rb on lines 485..488

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 25.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Parenthesize the param change { assignment_form.instance_variable_get(:@assignment).availability_flag } to make sure that the block will be associated with the change method call.
    Open

            expect { assignment_form.availability_flag }.not_to change { assignment_form.instance_variable_get(:@assignment).availability_flag }
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb by rubocop

    This cop checks for ambiguous block association with method when param passed without parentheses.

    Example:

    # bad
    some_method a { |val| puts val }

    Example:

    # good
    # With parentheses, there's no ambiguity.
    some_method(a) { |val| puts val }
    
    # good
    # Operator methods require no disambiguation
    foo == bar { |b| b.baz }
    
    # good
    # Lambda arguments require no disambiguation
    foo = ->(bar) { bar.baz }

    Parenthesize the param change { assignment_form.instance_variable_get(:@assignment).reviews_visible_to_all } to make sure that the block will be associated with the change method call.
    Open

            expect { assignment_form.micro_task }.not_to change { assignment_form.instance_variable_get(:@assignment).reviews_visible_to_all }
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb by rubocop

    This cop checks for ambiguous block association with method when param passed without parentheses.

    Example:

    # bad
    some_method a { |val| puts val }

    Example:

    # good
    # With parentheses, there's no ambiguity.
    some_method(a) { |val| puts val }
    
    # good
    # Operator methods require no disambiguation
    foo == bar { |b| b.baz }
    
    # good
    # Lambda arguments require no disambiguation
    foo = ->(bar) { bar.baz }

    Parenthesize the param change { assignment_form.instance_variable_get(:@assignment).microtask } to make sure that the block will be associated with the change method call.
    Open

            expect { assignment_form.micro_task }.not_to change { assignment_form.instance_variable_get(:@assignment).microtask }
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb by rubocop

    This cop checks for ambiguous block association with method when param passed without parentheses.

    Example:

    # bad
    some_method a { |val| puts val }

    Example:

    # good
    # With parentheses, there's no ambiguity.
    some_method(a) { |val| puts val }
    
    # good
    # Operator methods require no disambiguation
    foo == bar { |b| b.baz }
    
    # good
    # Lambda arguments require no disambiguation
    foo = ->(bar) { bar.baz }

    Parenthesize the param change { assignment_form.instance_variable_get(:@assignment).review_assignment_strategy } to make sure that the block will be associated with the change method call.
    Open

            expect { assignment_form.micro_task }.not_to change { assignment_form.instance_variable_get(:@assignment).review_assignment_strategy }
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb by rubocop

    This cop checks for ambiguous block association with method when param passed without parentheses.

    Example:

    # bad
    some_method a { |val| puts val }

    Example:

    # good
    # With parentheses, there's no ambiguity.
    some_method(a) { |val| puts val }
    
    # good
    # Operator methods require no disambiguation
    foo == bar { |b| b.baz }
    
    # good
    # Lambda arguments require no disambiguation
    foo = ->(bar) { bar.baz }

    Parenthesize the param change { assignment_form.instance_variable_get(:@assignment).require_quiz } to make sure that the block will be associated with the change method call.
    Open

            expect { assignment_form.require_quiz }.not_to change { assignment_form.instance_variable_get(:@assignment).require_quiz }
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb by rubocop

    This cop checks for ambiguous block association with method when param passed without parentheses.

    Example:

    # bad
    some_method a { |val| puts val }

    Example:

    # good
    # With parentheses, there's no ambiguity.
    some_method(a) { |val| puts val }
    
    # good
    # Operator methods require no disambiguation
    foo == bar { |b| b.baz }
    
    # good
    # Lambda arguments require no disambiguation
    foo = ->(bar) { bar.baz }

    Parenthesize the param change { assignment_form.instance_variable_get(:@assignment).staggered_deadline } to make sure that the block will be associated with the change method call.
    Open

            expect { assignment_form.staggered_deadline }.not_to change { assignment_form.instance_variable_get(:@assignment).staggered_deadline }
    Severity: Minor
    Found in spec/models/assignment_form_spec.rb by rubocop

    This cop checks for ambiguous block association with method when param passed without parentheses.

    Example:

    # bad
    some_method a { |val| puts val }

    Example:

    # good
    # With parentheses, there's no ambiguity.
    some_method(a) { |val| puts val }
    
    # good
    # Operator methods require no disambiguation
    foo == bar { |b| b.baz }
    
    # good
    # Lambda arguments require no disambiguation
    foo = ->(bar) { bar.baz }

    Prefer Date or Time over DateTime.
    Open

          allow(DateTime).to receive(:now).and_return(DateTime.new(2017, 10, 7, 11, 11, 11).in_time_zone)
    Severity: Minor
    Found in spec/models/assignment_form_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)

    Prefer Date or Time over DateTime.
    Open

          due_at = Time.parse(DateTime.new(2017, 10, 7, 12, 12, 12).in_time_zone.to_s(:db))
    Severity: Minor
    Found in spec/models/assignment_form_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