Remove unnecessary let in spec

This commit is contained in:
Ryan Cobb 2019-07-09 16:34:26 -06:00
parent a0c16db70d
commit 468b806902

View file

@ -3,17 +3,14 @@
require 'rails_helper'
describe Gitlab::DatabaseImporters::CommonMetrics::PrometheusMetric do
let(:existing_group_titles) do
::PrometheusMetricEnums.group_details.each_with_object({}) do |(key, value), memo|
memo[key] = value[:group_title]
end
end
it 'group enum equals ::PrometheusMetric' do
expect(described_class.groups).to eq(::PrometheusMetric.groups)
end
it '.group_titles equals ::PrometheusMetric' do
existing_group_titles = ::PrometheusMetricEnums.group_details.each_with_object({}) do |(key, value), memo|
memo[key] = value[:group_title]
end
expect(Gitlab::DatabaseImporters::CommonMetrics::PrometheusMetricEnums.group_titles).to eq(existing_group_titles)
end
end