提交 91c07d16 编写于 作者: Y Yorick Peterse 提交者: James Edwards-Jones

Fixed Rubocop deprecation warnings

上级 12d44272
......@@ -25,7 +25,7 @@ module Projects
# Check if we did extract public directory
archive_public_path = File.join(archive_path, 'public')
raise 'pages miss the public folder' unless Dir.exists?(archive_public_path)
raise 'pages miss the public folder' unless Dir.exist?(archive_public_path)
raise 'pages are outdated' unless latest?
deploy_page!(archive_public_path)
......
......@@ -5,7 +5,7 @@ describe Projects::UpdatePagesService do
let(:pipeline) { create :ci_pipeline, project: project, sha: project.commit('HEAD').sha }
let(:build) { create :ci_build, pipeline: pipeline, ref: 'HEAD' }
let(:invalid_file) { fixture_file_upload(Rails.root + 'spec/fixtures/dk.png') }
subject { described_class.new(project, build) }
before do
......@@ -18,7 +18,7 @@ describe Projects::UpdatePagesService do
let(:empty_file) { fixture_file_upload(Rails.root + "spec/fixtures/pages_empty.#{format}") }
let(:metadata) do
filename = Rails.root + "spec/fixtures/pages.#{format}.meta"
fixture_file_upload(filename) if File.exists?(filename)
fixture_file_upload(filename) if File.exist?(filename)
end
before do
......@@ -73,7 +73,7 @@ describe Projects::UpdatePagesService do
build.update_attributes(artifacts_file: invalid_file)
expect(execute).not_to eq(:success)
end
def execute
subject.execute[:status]
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册