From ad2b0358e0facd5c65c4141ce54c2e55bab165e6 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 13 Jan 2016 22:31:27 +0100 Subject: Improve readability of artifacts `Metadata` related code --- spec/lib/gitlab/ci/build/artifacts/metadata_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'spec/lib') diff --git a/spec/lib/gitlab/ci/build/artifacts/metadata_spec.rb b/spec/lib/gitlab/ci/build/artifacts/metadata_spec.rb index 42fbe40c890..8560493f5b5 100644 --- a/spec/lib/gitlab/ci/build/artifacts/metadata_spec.rb +++ b/spec/lib/gitlab/ci/build/artifacts/metadata_spec.rb @@ -10,8 +10,8 @@ describe Gitlab::Ci::Build::Artifacts::Metadata do end context 'metadata file exists' do - describe '#match! empty string' do - subject { metadata('').match! } + describe '#find_entries! empty string' do + subject { metadata('').find_entries! } it 'matches correct paths' do expect(subject.first).to contain_exactly 'ci_artifacts.txt', @@ -29,8 +29,8 @@ describe Gitlab::Ci::Build::Artifacts::Metadata do end end - describe '#match! other_artifacts_0.1.2/' do - subject { metadata('other_artifacts_0.1.2/').match! } + describe '#find_entries! other_artifacts_0.1.2/' do + subject { metadata('other_artifacts_0.1.2/').find_entries! } it 'matches correct paths' do expect(subject.first). @@ -40,8 +40,8 @@ describe Gitlab::Ci::Build::Artifacts::Metadata do end end - describe '#match! other_artifacts_0.1.2/another-subdirectory/' do - subject { metadata('other_artifacts_0.1.2/another-subdirectory/').match! } + describe '#find_entries! other_artifacts_0.1.2/another-subdirectory/' do + subject { metadata('other_artifacts_0.1.2/another-subdirectory/').find_entries! } it 'matches correct paths' do expect(subject.first). @@ -75,9 +75,9 @@ describe Gitlab::Ci::Build::Artifacts::Metadata do context 'metadata file does not exist' do let(:metadata_file_path) { '' } - describe '#match!' do + describe '#find_entries!' do it 'raises error' do - expect { metadata.match! }.to raise_error(Errno::ENOENT) + expect { metadata.find_entries! }.to raise_error(Errno::ENOENT) end end end -- cgit v1.2.1