lib/gitlab/dangerfiles/spec_helper.rb in gitlab-dangerfiles-2.9.1 vs lib/gitlab/dangerfiles/spec_helper.rb in gitlab-dangerfiles-2.9.2
- old
+ new
@@ -61,8 +61,8 @@
let(:fake_git) { double("fake-git", added_files: added_files, modified_files: modified_files, deleted_files: deleted_files, renamed_files: renamed_files) }
let(:fake_helper) { double("fake-helper", changes: changes, added_files: added_files, modified_files: modified_files, deleted_files: deleted_files, renamed_files: renamed_files, mr_iid: 1234, mr_title: mr_title, mr_labels: mr_labels) }
before do
allow(dangerfile).to receive(:git).and_return(fake_git)
- allow(dangerfile.helper).to receive(:changes).and_return(changes)
+ allow(dangerfile.helper).to receive(:changes).and_return(changes) if dangerfile.respond_to?(:helper)
end
end