OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Address "implicit block expectation syntax" deprecation warning (#13534)
Aaron Contrerasf033a5eccac2
diff --git a/modules/avatars/spec/models/user_spec.rb b/modules/avatars/spec/models/user_spec.rbindex 7c89cb52e7f..496aab42167 100644--- a/modules/avatars/spec/models/user_spec.rb+++ b/modules/avatars/spec/models/user_spec.rb@@ -1,5 +1,5 @@-require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')-require File.expand_path(File.dirname(__FILE__) + '/../shared_examples')+require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper")+require File.expand_path("#{File.dirname(__FILE__)}/../shared_examples")RSpec.describe User dolet(:user) { build(:user) }@@ -11,13 +11,13 @@ RSpec.describe User dodescribe "#local_avatar_attachment" dosubject { user.local_avatar_attachment }- context "WHEN user has an avatar" do+ context "when user has an avatar" dolet(:user) { user_with_avatar }it { is_expected.to be_a Attachment }end- context "WHEN user has no avatar" do+ context "when user has no avatar" dolet(:user) { user_without_avatar }it { is_expected.to be_blank }@@ -25,11 +25,11 @@ RSpec.describe User doenddescribe "#local_avatar_attachment=" do- context "WHEN the uploaded file is a good image" do+ context "when the uploaded file is a good image" dosubject { lambda { user.local_avatar_attachment = avatar_file } }- it { is_expected.not_to raise_error }- specify { is_expected.to change(user, :local_avatar_attachment) }+ specify { expect { subject.call }.not_to raise_error }+ specify { expect { subject.call }.to change(user, :local_avatar_attachment) }endendend