Showing 143 of 1,085 total issues
File budget_investments_spec.rb
has 1409 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Admin budget investments", :admin do
let(:budget) { create(:budget) }
let(:administrator) do
File investments_spec.rb
has 1343 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
require "sessions_helper"
describe "Budget Investments" do
let(:author) { create(:user, :level_two, username: "Isabel") }
File proposals_spec.rb
has 1281 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Proposals" do
it_behaves_like "milestoneable", :proposal
File investment_spec.rb
has 1084 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe Budget::Investment do
let(:investment) { build(:budget_investment) }
File user_spec.rb
has 860 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe User do
describe "#headings_voted_within_group" do
it "returns the headings voted by a user" do
File proposal_spec.rb
has 817 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe Proposal do
let(:proposal) { build(:proposal) }
File debates_spec.rb
has 630 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Debates" do
context "Concerns" do
it_behaves_like "notifiable in-app", :debate
File debate_spec.rb
has 593 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe Debate do
let(:debate) { build(:debate) }
File comments_spec.rb
has 553 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Comments" do
factories = [
:budget_investment,
File ballots_spec.rb
has 532 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
require "sessions_helper"
describe "Ballots" do
let(:user) { create(:user, :level_two) }
File users_auth_spec.rb
has 511 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Users" do
context "Regular authentication" do
context "Sign up" do
File machine_learning_spec.rb
has 484 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe MachineLearning do
def full_sanitizer(string)
ActionView::Base.full_sanitizer.sanitize(string)
Class Investment
has 51 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Investment < ApplicationRecord
SORTING_OPTIONS = { id: "id", supports: "cached_votes_up" }.freeze
include Measurable
include Sanitizable
File poll_spec.rb
has 461 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe Poll do
let(:poll) { build(:poll, :future) }
File budget_spec.rb
has 434 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe Budget do
let(:budget) { create(:budget) }
File query_type_spec.rb
has 434 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe Types::QueryType do
let(:user) { create(:user) }
let(:proposal) { create(:proposal, author: user) }
File polls_spec.rb
has 431 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Admin polls", :admin do
scenario "Index empty" do
visit admin_root_path
Class MachineLearning
has 45 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class MachineLearning
attr_reader :user, :script, :previous_modified_date
attr_accessor :job
SCRIPTS_FOLDER = Rails.root.join("public", "machine_learning", "scripts").freeze
File budget_investments_spec.rb
has 418 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Budget Investments" do
let(:manager) { create(:manager) }
let(:budget) { create(:budget, :selecting, name: "2033", slug: "budget_slug") }
File dashboard_spec.rb
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require "rails_helper"
describe "Proposal's dashboard" do
let(:proposal) { create(:proposal, :draft) }
before { login_as(proposal.author) }