spec/features/comments/budget_investments_spec.rb

Summary

Maintainability
F
4 days
Test Coverage

File budget_investments_spec.rb has 386 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

feature 'Commenting Budget::Investments' do

Severity: Minor
Found in spec/features/comments/budget_investments_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/budget_investments_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/legislation_questions_spec.rb on lines 346..398
    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 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/budget_investments_spec.rb and 3 other locations - About 5 hrs to fix
    spec/features/comments/budget_investments_spec.rb on lines 373..425
    spec/features/comments/legislation_questions_spec.rb on lines 346..398
    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 'Comment order' do
        c1 = create(:comment, :with_confidence_score, commentable: investment, cached_votes_up: 100,
                                                      cached_votes_total: 120, created_at: Time.current - 2)
        c2 = create(:comment, :with_confidence_score, commentable: investment, cached_votes_up: 10,
                                                      cached_votes_total: 12, created_at: Time.current - 1)
    Severity: Major
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 3 hrs to fix
    spec/features/comments/legislation_questions_spec.rb on lines 83..104

    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 'Creation date works differently in roots and in child comments, when sorting by confidence_score' do
       old_root = create(:comment, commentable: investment, created_at: Time.current - 10)
       new_root = create(:comment, commentable: investment, created_at: Time.current)
       old_child = create(:comment, commentable: investment, parent_id: new_root.id, created_at: Time.current - 10)
       new_child = create(:comment, commentable: investment, parent_id: new_root.id, created_at: Time.current)
    Severity: Major
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 3 hrs to fix
    spec/features/comments/legislation_questions_spec.rb on lines 107..126

    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: investment)
        child_comment  = create(:comment, body: "First subcomment", commentable: investment, parent: parent_comment)
        grandchild_comment = create(:comment, body: "Last subcomment", commentable: investment, parent: child_comment)
    
    
    Severity: Major
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 3 hrs to fix
    spec/features/comments/legislation_questions_spec.rb on lines 57..80

    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: investment)}
    
        visit budget_investment_path(investment.budget, investment)
    Severity: Major
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 1 hr to fix
    spec/features/comments/legislation_questions_spec.rb on lines 155..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 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

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

    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: investment)
    
        login_as(user)
        visit budget_investment_path(investment.budget, investment)
    Severity: Major
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 1 hr to fix
    spec/features/comments/legislation_questions_spec.rb on lines 274..287

    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 'Update', :js do
          visit budget_investment_path(@budget, @investment)
    
          within("#comment_#{@comment.id}_votes") do
            find('.in_favor a').click
    Severity: Major
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 1 hr to fix
    spec/custom/features/comments/budget_investments_spec.rb on lines 30..48

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

    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: investment, body: 'Built with http://rubyonrails.org/'
    
        visit budget_investment_path(investment.budget, investment)
    
    
    Severity: Major
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 1 hr to fix
    spec/features/comments/legislation_questions_spec.rb on lines 129..138

    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: investment,
                         body: "<script>alert('hola')</script> <a href=\"javascript:alert('sorpresa!')\">click me<a/> http://www.url.com"
    
        visit budget_investment_path(investment.budget, investment)
    Severity: Minor
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 45 mins to fix
    spec/features/comments/legislation_questions_spec.rb on lines 142..151

    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

      scenario "N replies", :js do
        parent = create(:comment, commentable: investment)
    
        7.times do
          create(:comment, commentable: investment, parent: parent)
    Severity: Minor
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 35 mins to fix
    spec/features/comments/legislation_questions_spec.rb on lines 262..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 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

      feature 'Not logged user' do
        scenario 'can not see comments forms' do
          create(:comment, commentable: investment)
          visit budget_investment_path(investment.budget, investment)
    
    
    Severity: Minor
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 35 mins to fix
    spec/features/comments/legislation_questions_spec.rb on lines 172..180

    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: investment, user: user)
    
        login_as(user)
        visit budget_investment_path(investment.budget, investment)
    Severity: Minor
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 35 mins to fix
    spec/features/comments/legislation_questions_spec.rb on lines 247..257

    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

        background do
          @manuela = create(:user, verified_at: Time.current)
          @pablo = create(:user)
          @investment = create(:budget_investment)
          @comment = create(:comment, commentable: @investment)
    Severity: Minor
    Found in spec/features/comments/budget_investments_spec.rb and 1 other location - About 20 mins to fix
    spec/custom/features/comments/budget_investments_spec.rb on lines 19..26

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

    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

    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 budget_investment_path(@budget, @investment)

    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"

    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. [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. [106/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
    Open

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

    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. [111/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
    Open

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

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

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

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

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

    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

          visit budget_investment_path(@budget, @investment)

    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 budget_investment_path(@budget, @investment)

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

          visit budget_investment_path(@budget, @investment)

    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. [112/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
    Open

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

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

          visit budget_investment_path(@budget, @investment)

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

          visit budget_investment_path(@budget, @budget, @investment)

    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 budget_investment_path(@budget, @budget, @investment)

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

          visit budget_investment_path(@budget, @investment)

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

          @budget = @investment.budget

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

          visit budget_investment_path(@budget, @budget, @investment)

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

        expect(page).to have_link "Go back to #{investment.title}", href: budget_investment_path(investment.budget, investment)

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

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

    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

          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

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

    There are no issues that match your filters.

    Category
    Status