spec/models/budget/investment_spec.rb

Summary

Maintainability
F
3 days
Test Coverage

File investment_spec.rb has 844 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'rails_helper'

describe Budget::Investment do
  let(:investment) { build(:budget_investment) }

Severity: Major
Found in spec/models/budget/investment_spec.rb - About 2 days to fix

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

      describe "#should_show_votes?" do
        it "returns true in selecting phase" do
          budget = create(:budget, phase: "selecting")
          investment = create(:budget_investment, budget: budget)
    
    
    Severity: Major
    Found in spec/models/budget/investment_spec.rb and 1 other location - About 1 hr to fix
    spec/models/budget/investment_spec.rb on lines 153..166

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

    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

      describe "#should_show_vote_count?" do
        it "returns true in valuating phase" do
          budget = create(:budget, phase: "valuating")
          investment = create(:budget_investment, budget: budget)
    
    
    Severity: Major
    Found in spec/models/budget/investment_spec.rb and 1 other location - About 1 hr to fix
    spec/models/budget/investment_spec.rb on lines 135..148

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

    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

        it "returns unselected investments" do
          budget.update(phase: "balloting")
    
          investment1 = create(:budget_investment, :feasible, :unselected, budget: budget)
          investment2 = create(:budget_investment, :feasible, :unselected, budget: budget)
    Severity: Major
    Found in spec/models/budget/investment_spec.rb and 1 other location - About 1 hr to fix
    spec/models/budget/investment_spec.rb on lines 558..569

    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

        it "returns selected investments" do
          budget.update(phase: "balloting")
    
          investment1 = create(:budget_investment, :feasible, :selected,   budget: budget)
          investment2 = create(:budget_investment, :feasible, :selected,   budget: budget)
    Severity: Major
    Found in spec/models/budget/investment_spec.rb and 1 other location - About 1 hr to fix
    spec/models/budget/investment_spec.rb on lines 572..583

    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

        it "returns unfeasible investments" do
          investment1 = create(:budget_investment, :unfeasible, budget: budget)
          investment2 = create(:budget_investment, :unfeasible, budget: budget)
          investment3 = create(:budget_investment, :feasible,   budget: budget)
    
    
    Severity: Minor
    Found in spec/models/budget/investment_spec.rb and 1 other location - About 55 mins to fix
    spec/models/budget/investment_spec.rb on lines 534..543

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 46.

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

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

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

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

    Refactorings

    Further Reading

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

        it "returns feasible investments" do
          investment1 = create(:budget_investment, :feasible,   budget: budget)
          investment2 = create(:budget_investment, :feasible,   budget: budget)
          investment3 = create(:budget_investment, :unfeasible, budget: budget)
    
    
    Severity: Minor
    Found in spec/models/budget/investment_spec.rb and 1 other location - About 55 mins to fix
    spec/models/budget/investment_spec.rb on lines 546..555

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 46.

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

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

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

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

    Refactorings

    Further Reading

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

          it "returns all investments with assigned valuator but valuation not finished" do
            investment1 = create(:budget_investment)
            investment2 = create(:budget_investment)
            investment3 = create(:budget_investment, valuation_finished: true)
    
    
    Severity: Major
    Found in spec/models/budget/investment_spec.rb and 2 other locations - About 45 mins to fix
    spec/models/budget/investment_spec.rb on lines 440..451
    spec/models/budget/investment_spec.rb on lines 456..467

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

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

          it "returns all investments with valuation finished" do
            investment1 = create(:budget_investment)
            investment2 = create(:budget_investment)
            investment3 = create(:budget_investment, valuation_finished: true)
    
    
    Severity: Major
    Found in spec/models/budget/investment_spec.rb and 2 other locations - About 45 mins to fix
    spec/models/budget/investment_spec.rb on lines 426..437
    spec/models/budget/investment_spec.rb on lines 440..451

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

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

          it "returns all investments with assigned valuator groups but valuation not finished" do
            investment1 = create(:budget_investment)
            investment2 = create(:budget_investment)
            investment3 = create(:budget_investment, valuation_finished: true)
    
    
    Severity: Major
    Found in spec/models/budget/investment_spec.rb and 2 other locations - About 45 mins to fix
    spec/models/budget/investment_spec.rb on lines 426..437
    spec/models/budget/investment_spec.rb on lines 456..467

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

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

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

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

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

    Refactorings

    Further Reading

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

      describe "#title" do
        it "is not valid without a title" do
          investment.title = nil
          expect(investment).not_to be_valid
        end
    Severity: Major
    Found in spec/models/budget/investment_spec.rb and 3 other locations - About 45 mins to fix
    spec/models/debate_spec.rb on lines 21..34
    spec/models/proposal_spec.rb on lines 27..40
    spec/models/proposal_spec.rb on lines 57..70

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

        context "tags" do
          it "searches by tags" do
            investment = create(:budget_investment, tag_list: 'Latina')
    
            results = described_class.search('Latina')
    Severity: Minor
    Found in spec/models/budget/investment_spec.rb and 2 other locations - About 30 mins to fix
    spec/models/debate_spec.rb on lines 525..533
    spec/models/proposal_spec.rb on lines 534..542

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

    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

        it "returns false if unfeasibility explanation blank" do
          investment.update(unfeasibility_explanation: "")
          Budget::Phase::PUBLISHED_PRICES_PHASES.each do |phase|
            budget.update(phase: phase)
    
    
    Severity: Minor
    Found in spec/models/budget/investment_spec.rb and 1 other location - About 20 mins to fix
    spec/models/budget/investment_spec.rb on lines 292..297

    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

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

        it "returns false if not unfeasible" do
          investment.update(feasibility: "undecided")
          Budget::Phase::PUBLISHED_PRICES_PHASES.each do |phase|
            budget.update(phase: phase)
    
    
    Severity: Minor
    Found in spec/models/budget/investment_spec.rb and 1 other location - About 20 mins to fix
    spec/models/budget/investment_spec.rb on lines 301..306

    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

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

          it "searches by author name" do
            author = create(:user, username: 'Danny Trejo')
            budget_investment = create(:budget_investment, author: author)
            results = described_class.search('Danny')
            expect(results).to eq([budget_investment])
    Severity: Minor
    Found in spec/models/budget/investment_spec.rb and 4 other locations - About 15 mins to fix
    spec/models/debate_spec.rb on lines 460..464
    spec/models/debate_spec.rb on lines 467..471
    spec/models/proposal_spec.rb on lines 471..475
    spec/models/proposal_spec.rb on lines 478..482

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 26.

    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

        it "returns false in any other phase" do
          (Budget::Phase::PHASE_KINDS - Budget::Phase::PUBLISHED_PRICES_PHASES).each do |phase|
            budget.update(phase: phase)
    
            expect(investment.should_show_price?).to eq(false)
    Severity: Minor
    Found in spec/models/budget/investment_spec.rb and 1 other location - About 15 mins to fix
    spec/models/budget/investment_spec.rb on lines 245..249

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 25.

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

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

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

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

    Refactorings

    Further Reading

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

        it "returns false in any other phase" do
          (Budget::Phase::PHASE_KINDS - Budget::Phase::PUBLISHED_PRICES_PHASES).each do |phase|
            budget.update(phase: phase)
    
            expect(investment.should_show_price_explanation?).to eq(false)
    Severity: Minor
    Found in spec/models/budget/investment_spec.rb and 1 other location - About 15 mins to fix
    spec/models/budget/investment_spec.rb on lines 210..214

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 25.

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

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

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

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

    Refactorings

    Further Reading

    Prefer not_to over to_not. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot)
    Open

          expect(another_investment.headings_voted_by_user(user2)).to_not include(new_york.id)

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

              inv1 = create(:budget_investment, :selected, budget: budget, group: districts, heading: carabanchel, price: 30)

    Inconsistent indentation detected. (https://github.com/bbatsov/ruby-style-guide#spaces-indentation)
    Open

          it "returns the administrator id when assigned" do
            investment.administrator = create(:administrator)
            expect(investment.code).to include("#{investment.id}-A#{investment.administrator.id}")
          end

    This cops checks for inconsistent indentation.

    Example:

    class A
      def test
        puts 'hello'
         puts 'world'
      end
    end

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

            investment2 = create(:budget_investment, administrator: create(:administrator), valuation_finished: true)

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

              inv1 = create(:budget_investment, :selected, budget: budget, group: group, heading: california)

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

          it "stores reclassfied votes and removes actual votes if an investment has been reclassified" do

    Prefer not_to over to_not. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot)
    Open

          expect(another_investment.headings_voted_by_user(user2)).to_not include(san_franciso.id)

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

              expect(inv2.reason_for_not_being_ballotable_by(user, ballot)).to eq(:not_enough_money_html)

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

              inv2 = create(:budget_investment, :selected, budget: budget, group: group, heading: new_york)

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

              inv2 = create(:budget_investment, :selected, budget: budget, group: districts, heading: carabanchel, price: 10)

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

              expect(investment.reason_for_not_being_ballotable_by(user, ballot)).to eq(:no_ballots_allowed)

    Prefer not_to over to_not. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot)
    Open

          expect(another_investment.headings_voted_by_user(user1)).to_not include(another_heading.id)

    Inconsistent indentation detected. (https://github.com/bbatsov/ruby-style-guide#spaces-indentation)
    Open

          it "returns the proposal id" do
            expect(investment.code).to include(investment.id.to_s)
          end

    This cops checks for inconsistent indentation.

    Example:

    class A
      def test
        puts 'hello'
         puts 'world'
      end
    end

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

          it "allows votes in a group with multiple headings after voting in group with a single heading" do

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

              expect(inv2.reason_for_not_being_ballotable_by(user, ballot)).to eq(:different_heading_assigned_html)

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

        it "returns true for unfeasible investments with unfeasibility explanation and valuation finished" do

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

          expect {investment.send_unfeasible_email}.to change { ActionMailer::Base.deliveries.count }.by(1)

    Prefer not_to over to_not. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot)
    Open

           expect(investments_by_budget).to_not include investment3

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

            expect(described_class.unselected.sort).to eq [unselected_undecided_investment, unselected_feasible_investment].sort

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

            expect(described_class.not_unfeasible.sort).to eq [undecided_investment, feasible_investment].sort

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

          it "does not store reclassified votes nor remove actual votes if the investment has not been reclassifed" do

    Prefer not_to over to_not. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot)
    Open

          expect(another_investment.headings_voted_by_user(user2)).to_not include(another_heading.id)

    There are no issues that match your filters.

    Category
    Status