diff options
Diffstat (limited to 'spec/models/prometheus_metric_spec.rb')
-rw-r--r-- | spec/models/prometheus_metric_spec.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/spec/models/prometheus_metric_spec.rb b/spec/models/prometheus_metric_spec.rb index 9588167bbcc..a20f4edcf4a 100644 --- a/spec/models/prometheus_metric_spec.rb +++ b/spec/models/prometheus_metric_spec.rb @@ -3,6 +3,8 @@ require 'spec_helper' RSpec.describe PrometheusMetric do + using RSpec::Parameterized::TableSyntax + subject { build(:prometheus_metric) } it_behaves_like 'having unique enum values' @@ -14,8 +16,6 @@ RSpec.describe PrometheusMetric do it { is_expected.to validate_uniqueness_of(:identifier).scoped_to(:project_id).allow_nil } describe 'common metrics' do - using RSpec::Parameterized::TableSyntax - where(:common, :with_project, :result) do false | true | true false | false | false @@ -34,8 +34,6 @@ RSpec.describe PrometheusMetric do end describe '#query_series' do - using RSpec::Parameterized::TableSyntax - where(:legend, :type) do 'Some other legend' | NilClass 'Status Code' | Array @@ -72,8 +70,6 @@ RSpec.describe PrometheusMetric do end describe '#priority' do - using RSpec::Parameterized::TableSyntax - where(:group, :priority) do :nginx_ingress_vts | 10 :nginx_ingress | 10 @@ -97,8 +93,6 @@ RSpec.describe PrometheusMetric do end describe '#required_metrics' do - using RSpec::Parameterized::TableSyntax - where(:group, :required_metrics) do :nginx_ingress_vts | %w(nginx_upstream_responses_total nginx_upstream_response_msecs_avg) :nginx_ingress | %w(nginx_ingress_controller_requests nginx_ingress_controller_ingress_upstream_latency_seconds_sum) |