Commit ae2514d0 authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Update class calls

parent abca34d0
......@@ -32,8 +32,7 @@ module Gitlab
def medians_per_stage
projects.each_with_object({}) do |project, hsh|
::CycleAnalytics.new(project, options).all_medians_per_stage.each do |stage_name, median|
hsh[stage_name] ||= []
::CycleAnalytics::ProjectLevel.new(project: project, options: options).all_medians_per_stage.each do |stage_name, median| hsh[stage_name] ||= []
hsh[stage_name] << median
end
end
......
......@@ -8,7 +8,7 @@ describe 'CycleAnalytics#code' do
let(:project) { create(:project, :repository) }
let(:from_date) { 10.days.ago }
let(:user) { create(:user, :admin) }
subject { CycleAnalytics.new(project, from: from_date) }
subject { CycleAnalytics::ProjectLevel.new(project: project, options: { from: from_date }) }
context 'with deployment' do
generate_cycle_analytics_spec(
......
......@@ -8,7 +8,7 @@ describe 'CycleAnalytics#issue' do
let(:project) { create(:project, :repository) }
let(:from_date) { 10.days.ago }
let(:user) { create(:user, :admin) }
subject { CycleAnalytics.new(project, from: from_date) }
subject { CycleAnalytics::ProjectLevel.new(project: project, options: { from: from_date }) }
generate_cycle_analytics_spec(
phase: :issue,
......
......@@ -8,7 +8,7 @@ describe 'CycleAnalytics#plan' do
let(:project) { create(:project, :repository) }
let(:from_date) { 10.days.ago }
let(:user) { create(:user, :admin) }
subject { CycleAnalytics.new(project, from: from_date) }
subject { CycleAnalytics::ProjectLevel.new(project: project, options: { from: from_date }) }
generate_cycle_analytics_spec(
phase: :plan,
......
......@@ -8,7 +8,7 @@ describe 'CycleAnalytics#production' do
let(:project) { create(:project, :repository) }
let(:from_date) { 10.days.ago }
let(:user) { create(:user, :admin) }
subject { CycleAnalytics.new(project, from: from_date) }
subject { CycleAnalytics::ProjectLevel.new(project: project, options: { from: from_date }) }
generate_cycle_analytics_spec(
phase: :production,
......
......@@ -8,7 +8,7 @@ describe 'CycleAnalytics#review' do
let(:project) { create(:project, :repository) }
let(:from_date) { 10.days.ago }
let(:user) { create(:user, :admin) }
subject { CycleAnalytics.new(project, from: from_date) }
subject { CycleAnalytics::ProjectLevel.new(project: project, options: { from: from_date }) }
generate_cycle_analytics_spec(
phase: :review,
......
......@@ -9,7 +9,7 @@ describe 'CycleAnalytics#staging' do
let(:from_date) { 10.days.ago }
let(:user) { create(:user, :admin) }
subject { CycleAnalytics.new(project, from: from_date) }
subject { CycleAnalytics::ProjectLevel.new(project: project, options: { from: from_date }) }
generate_cycle_analytics_spec(
phase: :staging,
......
......@@ -8,7 +8,7 @@ describe 'CycleAnalytics#test' do
let(:project) { create(:project, :repository) }
let(:from_date) { 10.days.ago }
let(:user) { create(:user, :admin) }
subject { CycleAnalytics.new(project, from: from_date) }
subject { CycleAnalytics::ProjectLevel.new(project: project, options: { from: from_date }) }
generate_cycle_analytics_spec(
phase: :test,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment