spec/features/comments/legislation_questions_spec.rb

Summary

Maintainability
F
4 days
Test Coverage

File legislation_questions_spec.rb has 406 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'rails_helper'
include ActionView::Helpers::DateHelper

feature 'Commenting legislation questions' do

Severity: Minor
Found in spec/features/comments/legislation_questions_spec.rb - About 5 hrs to fix

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

      feature "Administrators" do
        scenario "can create comment as an administrator", :js do
          admin = create(:administrator)
    
          login_as(admin.user)
    Severity: Major
    Found in spec/features/comments/legislation_questions_spec.rb and 3 other locations - About 5 hrs to fix
    spec/features/comments/budget_investments_spec.rb on lines 317..369
    spec/features/comments/budget_investments_spec.rb on lines 373..425
    spec/features/comments/legislation_questions_spec.rb on lines 346..398

    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 185.

    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

      feature "Moderators" do
        scenario "can create comment as a moderator", :js do
          moderator = create(:moderator)
    
          login_as(moderator.user)
    Severity: Major
    Found in spec/features/comments/legislation_questions_spec.rb and 3 other locations - About 5 hrs to fix
    spec/features/comments/budget_investments_spec.rb on lines 317..369
    spec/features/comments/budget_investments_spec.rb on lines 373..425
    spec/features/comments/legislation_questions_spec.rb on lines 402..454

    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 185.

    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

      scenario 'Creation date works differently in roots and in child comments, even when sorting by confidence_score' do
        old_root = create(:comment, commentable: legislation_question, created_at: Time.current - 10)
        new_root = create(:comment, commentable: legislation_question, created_at: Time.current)
        old_child = create(:comment, commentable: legislation_question, parent_id: new_root.id, created_at: Time.current - 10)
        new_child = create(:comment, commentable: legislation_question, parent_id: new_root.id, created_at: Time.current)
    Severity: Major
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 3 hrs to fix
    spec/features/comments/budget_investments_spec.rb on lines 106..125

    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 116.

    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

      scenario 'Comment order' do
        c1 = create(:comment, :with_confidence_score, commentable: legislation_question, cached_votes_up: 100,
                                                      cached_votes_total: 120, created_at: Time.current - 2)
        c2 = create(:comment, :with_confidence_score, commentable: legislation_question, cached_votes_up: 10,
                                                      cached_votes_total: 12, created_at: Time.current - 1)
    Severity: Major
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 3 hrs to fix
    spec/features/comments/budget_investments_spec.rb on lines 82..103

    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 116.

    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

      scenario 'Collapsable comments', :js do
        parent_comment = create(:comment, body: "Main comment", commentable: legislation_question)
        child_comment  = create(:comment, body: "First subcomment", commentable: legislation_question, parent: parent_comment)
        grandchild_comment = create(:comment, body: "Last subcomment", commentable: legislation_question, parent: child_comment)
    
    
    Severity: Major
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 3 hrs to fix
    spec/features/comments/budget_investments_spec.rb on lines 56..79

    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 115.

    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

      scenario 'Paginated comments' do
        per_page = 10
        (per_page + 2).times { create(:comment, commentable: legislation_question)}
    
        visit legislation_process_question_path(legislation_question.process, legislation_question)
    Severity: Major
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 1 hr to fix
    spec/features/comments/budget_investments_spec.rb on lines 154..168

    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 61.

    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

        xscenario 'Trying to vote multiple times', :js do
          visit legislation_process_question_path(@legislation_question.process, @legislation_question)
    
          within("#comment_#{@comment.id}_votes") do
            find('.in_favor a').click
    Severity: Major
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 1 hr to fix
    spec/custom/features/comments/legislation_questions_spec.rb on lines 28..47

    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 59.

    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

      scenario "Undoing flagging as inappropriate", :js do
        comment = create(:comment, commentable: legislation_question)
        Flag.flag(user, comment)
    
        login_as(user)
    Severity: Major
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 1 hr to fix
    spec/features/comments/budget_investments_spec.rb on lines 274..288

    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 58.

    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

      scenario "Flagging as inappropriate", :js do
        comment = create(:comment, commentable: legislation_question)
    
        login_as(user)
        visit legislation_process_question_path(legislation_question.process, legislation_question)
    Severity: Major
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 1 hr to fix
    spec/features/comments/budget_investments_spec.rb on lines 258..271

    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 54.

    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

      scenario 'Turns links into html links' do
        create :comment, commentable: legislation_question, body: 'Built with http://rubyonrails.org/'
    
        visit legislation_process_question_path(legislation_question.process, legislation_question)
    
    
    Severity: Major
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 1 hr to fix
    spec/features/comments/budget_investments_spec.rb on lines 128..137

    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 50.

    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

      scenario 'Sanitizes comment body for security' do
        create :comment, commentable: legislation_question,
                         body: "<script>alert('hola')</script> <a href=\"javascript:alert('sorpresa!')\">click me<a/> http://www.url.com"
    
        visit legislation_process_question_path(legislation_question.process, legislation_question)
    Severity: Minor
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 45 mins to fix
    spec/features/comments/budget_investments_spec.rb on lines 141..150

    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 39.

    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

      feature 'Not logged user' do
        scenario 'can not see comments forms' do
          create(:comment, commentable: legislation_question)
          visit legislation_process_question_path(legislation_question.process, legislation_question)
    
    
    Severity: Minor
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 35 mins to fix
    spec/features/comments/budget_investments_spec.rb on lines 171..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 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 2 locations. Consider refactoring.
    Open

      scenario "N replies", :js do
        parent = create(:comment, commentable: legislation_question)
    
        7.times do
          create(:comment, commentable: legislation_question, parent: parent)
    Severity: Minor
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 35 mins to fix
    spec/features/comments/budget_investments_spec.rb on lines 246..255

    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 2 locations. Consider refactoring.
    Open

      scenario 'Errors on reply', :js do
        comment = create(:comment, commentable: legislation_question, user: user)
    
        login_as(user)
        visit legislation_process_question_path(legislation_question.process, legislation_question)
    Severity: Minor
    Found in spec/features/comments/legislation_questions_spec.rb and 1 other location - About 35 mins to fix
    spec/features/comments/budget_investments_spec.rb on lines 231..241

    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

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

        visit legislation_process_question_path(legislation_question.process, legislation_question, order: :oldest)

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

        old_child = create(:comment, commentable: legislation_question, parent_id: new_root.id, created_at: Time.current - 10)

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

        fill_in "comment-body-legislation_question_#{legislation_question.id}", with: 'Testing submit button!'

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

        visit legislation_process_question_path(legislation_question.process, legislation_question, order: :most_voted)

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

          create(:vote, voter: @manuela, votable: @comment, vote_flag: true)

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

        c2 = create(:comment, :with_confidence_score, commentable: legislation_question, cached_votes_up: 10,

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

        href           = legislation_process_question_path(legislation_question.process, legislation_question)

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

        visit legislation_process_question_path(legislation_question.process, legislation_question, order: :newest)

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

                         body: "<script>alert('hola')</script> <a href=\"javascript:alert('sorpresa!')\">click me<a/> http://www.url.com"

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

          fill_in "comment-body-legislation_question_#{legislation_question.id}", with: "I am your Admin!"

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

          visit legislation_process_question_path(@legislation_question.process, @legislation_question)

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

          visit legislation_process_question_path(@legislation_question.process, @legislation_question)

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

        new_child = create(:comment, commentable: legislation_question, parent_id: new_root.id, created_at: Time.current)

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

        process.update_attributes(debate_start_date: Date.current - 2.days, debate_end_date: Date.current - 1.day)

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

          create(:vote, voter: @pablo, votable: @comment, vote_flag: false)

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

          visit legislation_process_question_path(@legislation_question.process, @legislation_question)

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

          within("#comment_#{@comment.id}_votes") do

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

          visit legislation_process_question_path(@legislation_question.process, @legislation_question)

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

          visit legislation_process_question_path(@legislation_question.process, @legislation_question)

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

                                                      cached_votes_total: 12, created_at: Time.current - 1)

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

        visit legislation_process_question_path(legislation_question.process, legislation_question, order: :most_voted)

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

        grandchild_comment = create(:comment, body: "Last subcomment", commentable: legislation_question, parent: child_comment)

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

        visit legislation_process_question_path(legislation_question.process, legislation_question, order: :oldest)

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

        fill_in "comment-body-legislation_question_#{legislation_question.id}", with: 'Have you thought about...?'

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

          visit legislation_process_question_path(@legislation_question.process, @legislation_question)

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

                                                      cached_votes_total: 120, created_at: Time.current - 2)

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

        c3 = create(:comment, :with_confidence_score, commentable: legislation_question, cached_votes_up: 1,

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

        visit legislation_process_question_path(legislation_question.process, legislation_question, order: :newest)

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

        child_comment  = create(:comment, body: "First subcomment", commentable: legislation_question, parent: parent_comment)

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

        c1 = create(:comment, :with_confidence_score, commentable: legislation_question, cached_votes_up: 100,

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

          login_as(@manuela)

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

          create(:vote, voter: @pablo, votable: @comment, vote_flag: false)

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

          within("#comment_#{@comment.id}_votes") do

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

      scenario 'Creation date works differently in roots and in child comments, even when sorting by confidence_score' do

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

          fill_in "comment-body-legislation_question_#{legislation_question.id}", with: "I am moderating!"

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

          create(:vote, voter: @manuela, votable: @comment, vote_flag: true)

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

          visit legislation_process_question_path(@legislation_question.process, @legislation_question)

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

          visit legislation_process_question_path(@legislation_question.process, @legislation_question)

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

        legislation_question = create(:legislation_question, process: process, title: "Should we change the world?")

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

          @comment = create(:comment, commentable: @legislation_question)

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

          within("#comment_#{@comment.id}_votes") do

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

          within("#comment_#{@comment.id}_votes") do

    There are no issues that match your filters.

    Category
    Status