TODO found Open
# CDJ Custom : broken but no time to investigate TODO
- Exclude checks
Similar blocks of code found in 2 locations. Consider refactoring. Open
within("#budget-investments") do
expect(page).to have_css('.budget-investment', count: 1)
expect(page).to have_content(budget_investment1.title)
expect(page).not_to have_content(budget_investment2.title)
expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment1)}']",
- Read upRead up
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 38.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
within("#budget-investments") do
expect(page).to have_css('.budget-investment', count: 1)
expect(page).not_to have_content(budget_investment1.title)
expect(page).to have_content(budget_investment2.title)
expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment2)}']",
- Read upRead up
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 38.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
background do
login_as_manager
@budget = create(:budget, phase: 'selecting', name: "2033")
@group = create(:budget_group, budget: @budget, name: 'Whole city')
@heading = create(:budget_heading, group: @group, name: "Health")
- Read upRead up
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 28.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
within(".account-info") do
expect(page).to have_content "Identified as"
expect(page).to have_content user.username
expect(page).to have_content user.email
expect(page).to have_content user.document_number
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
within(".account-info") do
expect(page).to have_content "Identified as"
expect(page).to have_content user.username
expect(page).to have_content user.email
expect(page).to have_content user.document_number
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Line is too long. [101/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
budget_investment1 = create(:budget_investment, budget: @budget, title: "Show me what you got")
- Exclude checks
Line is too long. [111/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment1)}']",
- Exclude checks
Line is too long. [104/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
heading: create(:budget_heading, name: "Area 52"))
- Exclude checks
Line is too long. [107/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
heading: create(:budget_heading, name: "District 9"))
- Exclude checks
Line is too long. [111/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment2)}']",
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_content I18n.l(@budget.created_at.to_date)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
within "#budget_#{@budget.id}" do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
within "#budget_#{@budget.id}" do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
budget_investment = create(:budget_investment, budget: @budget)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
another_heading = create(:budget_heading, group: @group)
- Exclude checks
Line is too long. [136/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
mid_investment = create(:budget_investment, budget: @budget, title: 'Change district 9', heading: district_9, cached_votes_up: 10)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
within "#budget_#{@budget.id}" do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
budget_investment1 = create(:budget_investment, budget: @budget, title: "Hey ho",
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_content(@budget.name)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
district_9 = create(:budget_heading, group: @group, name: "District Nine")
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
mid_investment = create(:budget_investment, budget: @budget, title: 'Change district 9', heading: district_9, cached_votes_up: 10)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
unvoted_investment = create(:budget_investment, budget: @budget, heading: another_heading, title: 'Add new districts to the city')
- Exclude checks
Line is too long. [109/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment2)}']",
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment1)}']",
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
within "#budget_#{@budget.id}" do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
within "#budget_#{@budget.id}" do
- Exclude checks
Line is too long. [109/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment1)}']",
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
@heading = create(:budget_heading, group: @group, name: "Health")
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
budget_investment1 = create(:budget_investment, budget: @budget, title: "Show me what you got")
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_content(@budget.name)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
budget_investment1 = create(:budget_investment, budget: @budget, title: "Show me what you got")
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
budget_investment = create(:budget_investment, budget: @budget, heading: @heading)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
within "#budget_#{@budget.id}" do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_content(@budget.name)
- Exclude checks
Line is too long. [138/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
top_investment = create(:budget_investment, budget: @budget, title: 'Destroy district 9', heading: district_9, cached_votes_up: 100)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
@group = create(:budget_group, budget: @budget, name: 'Whole city')
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
within "#budget_#{@budget.id}" do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment2)}']",
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
budget_investment2 = create(:budget_investment, budget: @budget, title: "Get Schwifty")
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
budget_investment = create(:budget_investment, budget: @budget)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_content(@budget.name)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
low_investment = create(:budget_investment, budget: @budget, title: 'Nuke district 9', heading: district_9, cached_votes_up: 1)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
budget_investment = create(:budget_investment, budget: @budget, heading: @heading)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_content(@budget.name)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_content(@budget.name)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
budget_investment2 = create(:budget_investment, budget: @budget, title: "Get Schwifty")
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_content(@budget.name)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment1)}']",
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment2)}']",
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
16.times { create(:budget_investment, budget: @budget, heading: @heading) }
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
before { @budget.update(phase: 'accepting') }
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
budget_investment2 = create(:budget_investment, budget: @budget, title: "Let's go",
- Exclude checks
Line is too long. [133/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
low_investment = create(:budget_investment, budget: @budget, title: 'Nuke district 9', heading: district_9, cached_votes_up: 1)
- Exclude checks
Line is too long. [136/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits) Open
unvoted_investment = create(:budget_investment, budget: @budget, heading: another_heading, title: 'Add new districts to the city')
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
top_investment = create(:budget_investment, budget: @budget, title: 'Destroy district 9', heading: district_9, cached_votes_up: 100)
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
within "#budget_#{@budget.id}" do
- Exclude checks
Use let
instead of an instance variable. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InstanceVariable) Open
16.times { create(:budget_investment, budget: @budget, heading: @heading) }
- Exclude checks