diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-02 15:21:58 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-02 20:46:29 +0300 |
commit | c86e1437eb415e816dcc29f0b1acafeed2dcc266 (patch) | |
tree | 5ec842bb0258e08cfd4a4816892ab0a8d3042cdc /spec/lib/gitlab/health_checks | |
parent | e21b1501ff16de7657a4a5eccb3b8124ba07709c (diff) |
Make fixture message more descriptive
+ use strip_heredoc to make the text in tests much more readable
Diffstat (limited to 'spec/lib/gitlab/health_checks')
-rw-r--r-- | spec/lib/gitlab/health_checks/prometheus_text_format_spec.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/spec/lib/gitlab/health_checks/prometheus_text_format_spec.rb b/spec/lib/gitlab/health_checks/prometheus_text_format_spec.rb index a9feab8ff78..b07f95443ee 100644 --- a/spec/lib/gitlab/health_checks/prometheus_text_format_spec.rb +++ b/spec/lib/gitlab/health_checks/prometheus_text_format_spec.rb @@ -11,12 +11,13 @@ describe Gitlab::HealthChecks::PrometheusTextFormat do end it 'marshal to text with non repeating type definition' do - expected = <<-EXPECTED -# TYPE metric1 gauge -metric1 1 -# TYPE metric2 gauge -metric2 2 -EXPECTED + expected = <<-EXPECTED.strip_heredoc + # TYPE metric1 gauge + metric1 1 + # TYPE metric2 gauge + metric2 2 + EXPECTED + expect(subject.marshal(sample_metrics)).to eq(expected.chomp) end @@ -30,12 +31,12 @@ EXPECTED end it 'marshal to text with non repeating type definition' do - expected = <<-EXPECTED -# TYPE metric1 gauge -metric1 1 -metric1 2 -# TYPE metric2 gauge -metric2 3 + expected = <<-EXPECTED.strip_heredoc + # TYPE metric1 gauge + metric1 1 + metric1 2 + # TYPE metric2 gauge + metric2 3 EXPECTED expect(subject.marshal(sample_metrics)).to eq(expected.chomp) end |