spec/features/officing/results_spec.rb
TODO found Open
Open
travel_to Time.now # TODO: use `freeze_time` after migrating to Rails 5.
- Exclude checks
Line is too long. [105/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
within("#results_#{partial_result.booth_assignment_id}_#{partial_result.date.strftime('%Y%m%d')}") do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
@poll.update(ends_at: 1.day.ago)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
officer_assignment: @officer_assignment,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
booth_assignment: @officer_assignment.booth_assignment,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
date: I18n.l(@poll.ends_at.to_date),
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
expect(page).to have_content(@question_1.title)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
@question_2.question_answers.each_with_index do |answer, i|
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
@question_2 = create(:poll_question, poll: @poll)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
regular_officer_assignment_1 = create(:poll_officer_assignment, officer: @poll_officer)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
expect(page).to have_content(@poll.name)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
expect(page).to have_content(@question_2.title)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
expect(page).to have_content(@poll.name)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
fill_in "questions[#{@question_1.id}][1]", with: '200'
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
fill_in "questions[#{@question_2.id}][0]", with: '333'
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
officer_assignment: @officer_assignment,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
booth_assignment: @officer_assignment.booth_assignment,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
create(:poll_question_answer, title: 'No', question: @question_1)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
within("#question_#{@question_1.id}_0_result") { expect(page).to have_content('7777') }
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
expect(page).to have_content(I18n.l(@poll.ends_at.to_date, format: :long))
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
@question_1.question_answers.each_with_index do |answer, i|
- Exclude checks
Line is too long. [102/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
within("#question_#{@question_2.id}_#{i}_result") { expect(page).to have_content(answer.title) }
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
@officer_assignment = create(:poll_officer_assignment, :final, officer: @poll_officer)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
author: @poll_officer.user,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
fill_in "questions[#{@question_1.id}][0]", with: '5555'
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
fill_in "questions[#{@question_1.id}][1]", with: '200'
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
fill_in "questions[#{@question_2.id}][1]", with: '444'
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
booth_assignment: @officer_assignment.booth_assignment,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
booth_assignment_id: @officer_assignment.booth_assignment_id)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
@poll = @officer_assignment.booth_assignment.poll
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
within("#poll_#{@poll.id}") do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
fill_in "questions[#{@question_1.id}][0]", with: '100'
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
officer_assignment: @officer_assignment,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
question: @question_1,
- Exclude checks
Line is too long. [103/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
within("#results_#{@officer_assignment.booth_assignment_id}_#{Date.current.strftime('%Y%m%d')}") do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
within("#question_#{@question_2.id}_#{i}_result") { expect(page).to have_content(answer.title) }
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
create(:poll_question_answer, title: 'Tomorrow', question: @question_2)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
login_as(@poll_officer.user)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
booth_name = @officer_assignment.booth_assignment.booth.name
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
date: @poll.ends_at,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
@question_1 = create(:poll_question, poll: @poll)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
answer: @question_1.question_answers.first.title,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
visit new_officing_poll_result_path(@poll)
- Exclude checks
Line is too long. [102/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
within("#question_#{@question_1.id}_#{i}_result") { expect(page).to have_content(answer.title) }
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
regular_officer_assignment_2 = create(:poll_officer_assignment, officer: @poll_officer)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
within("#results_#{@officer_assignment.booth_assignment_id}_#{Date.current.strftime('%Y%m%d')}") do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
question: @question_1,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
date: @poll.ends_at,
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
visit officing_poll_results_path(@poll,
- Exclude checks
Line is too long. [135/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
Open
visit officing_poll_results_path(@poll, date: I18n.l(partial_result.date), booth_assignment_id: partial_result.booth_assignment_id)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
create(:poll_question_answer, title: 'Yes', question: @question_1)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
create(:poll_question_answer, title: 'Today', question: @question_2)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
visit officing_poll_results_path(@poll, date: I18n.l(partial_result.date), booth_assignment_id: partial_result.booth_assignment_id)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
within("#question_#{@question_1.id}_0_result") { expect(page).to have_content('5555') }
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
within("#question_#{@question_1.id}_1_result") { expect(page).to have_content('200') }
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
expect(page).to have_content(@officer_assignment.booth_assignment.booth.name)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
Open
within("#question_#{@question_1.id}_#{i}_result") { expect(page).to have_content(answer.title) }
- Exclude checks