spec/features/officing/results_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage

TODO found
Open

    travel_to Time.now # TODO: use `freeze_time` after migrating to Rails 5.

Line is too long. [105/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

    within("#results_#{partial_result.booth_assignment_id}_#{partial_result.date.strftime('%Y%m%d')}") do

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    @poll.update(ends_at: 1.day.ago)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      officer_assignment: @officer_assignment,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      booth_assignment: @officer_assignment.booth_assignment,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                                     date: I18n.l(@poll.ends_at.to_date),

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    expect(page).to have_content(@question_1.title)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    @question_2.question_answers.each_with_index do |answer, i|

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    @question_2 = create(:poll_question, poll: @poll)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    regular_officer_assignment_1 = create(:poll_officer_assignment, officer: @poll_officer)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

      expect(page).to have_content(@poll.name)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    expect(page).to have_content(@question_2.title)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    expect(page).to have_content(@poll.name)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    fill_in "questions[#{@question_1.id}][1]", with: '200'

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    fill_in "questions[#{@question_2.id}][0]", with: '333'

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      officer_assignment: @officer_assignment,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      booth_assignment: @officer_assignment.booth_assignment,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    create(:poll_question_answer, title: 'No', question: @question_1)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    within("#question_#{@question_1.id}_0_result") { expect(page).to have_content('7777') }

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    expect(page).to have_content(I18n.l(@poll.ends_at.to_date, format: :long))

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    @question_1.question_answers.each_with_index do |answer, i|

Line is too long. [102/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

      within("#question_#{@question_2.id}_#{i}_result") { expect(page).to have_content(answer.title) }

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    @officer_assignment = create(:poll_officer_assignment, :final, officer: @poll_officer)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      author: @poll_officer.user,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    fill_in "questions[#{@question_1.id}][0]", with: '5555'

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    fill_in "questions[#{@question_1.id}][1]", with: '200'

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    fill_in "questions[#{@question_2.id}][1]", with: '444'

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      booth_assignment: @officer_assignment.booth_assignment,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                                     booth_assignment_id: @officer_assignment.booth_assignment_id)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    @poll = @officer_assignment.booth_assignment.poll

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    within("#poll_#{@poll.id}") do

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    fill_in "questions[#{@question_1.id}][0]", with: '100'

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      officer_assignment: @officer_assignment,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      question: @question_1,

Line is too long. [103/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

    within("#results_#{@officer_assignment.booth_assignment_id}_#{Date.current.strftime('%Y%m%d')}") do

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

      within("#question_#{@question_2.id}_#{i}_result") { expect(page).to have_content(answer.title) }

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    create(:poll_question_answer, title: 'Tomorrow', question: @question_2)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    login_as(@poll_officer.user)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    booth_name = @officer_assignment.booth_assignment.booth.name

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      date: @poll.ends_at,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    @question_1 = create(:poll_question, poll: @poll)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      answer: @question_1.question_answers.first.title,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    visit new_officing_poll_result_path(@poll)

Line is too long. [102/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

      within("#question_#{@question_1.id}_#{i}_result") { expect(page).to have_content(answer.title) }

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    regular_officer_assignment_2 = create(:poll_officer_assignment, officer: @poll_officer)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    within("#results_#{@officer_assignment.booth_assignment_id}_#{Date.current.strftime('%Y%m%d')}") do

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      question: @question_1,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

                      date: @poll.ends_at,

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    visit officing_poll_results_path(@poll,

Line is too long. [135/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

    visit officing_poll_results_path(@poll, date: I18n.l(partial_result.date), booth_assignment_id: partial_result.booth_assignment_id)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    create(:poll_question_answer, title: 'Yes', question: @question_1)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    create(:poll_question_answer, title: 'Today', question: @question_2)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    visit officing_poll_results_path(@poll, date: I18n.l(partial_result.date), booth_assignment_id: partial_result.booth_assignment_id)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    within("#question_#{@question_1.id}_0_result") { expect(page).to have_content('5555') }

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    within("#question_#{@question_1.id}_1_result") { expect(page).to have_content('200') }

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

    expect(page).to have_content(@officer_assignment.booth_assignment.booth.name)

Use let instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable)
Open

      within("#question_#{@question_1.id}_#{i}_result") { expect(page).to have_content(answer.title) }

There are no issues that match your filters.

Category
Status