Commit 3a54e151 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'fix-danger-use-helper' into 'master'

User danger helper for all_changed_files

See merge request gitlab-org/gitlab!56511
parents 3e060c30 2dd750f9
...@@ -236,7 +236,7 @@ RSpec.describe Tooling::Danger::ProjectHelper do ...@@ -236,7 +236,7 @@ RSpec.describe Tooling::Danger::ProjectHelper do
subject { project_helper.all_ee_changes } subject { project_helper.all_ee_changes }
it 'returns all changed files starting with ee/' do it 'returns all changed files starting with ee/' do
expect(project_helper).to receive(:all_changed_files).and_return(%w[fr/ee/beer.rb ee/wine.rb ee/lib/ido.rb ee.k]) expect(fake_helper).to receive(:all_changed_files).and_return(%w[fr/ee/beer.rb ee/wine.rb ee/lib/ido.rb ee.k])
is_expected.to match_array(%w[ee/wine.rb ee/lib/ido.rb]) is_expected.to match_array(%w[ee/wine.rb ee/lib/ido.rb])
end end
......
...@@ -149,7 +149,7 @@ module Tooling ...@@ -149,7 +149,7 @@ module Tooling
end end
def all_ee_changes def all_ee_changes
all_changed_files.grep(%r{\Aee/}) helper.all_changed_files.grep(%r{\Aee/})
end end
def project_name def project_name
......
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