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
use receive_messages as rubocop suggests
Ivan Kuchinac2c91063842
diff --git a/modules/costs/spec/lib/costs/query_currency_select_spec.rb b/modules/costs/spec/lib/costs/query_currency_select_spec.rbindex d107207b986..26ecf739d7d 100644--- a/modules/costs/spec/lib/costs/query_currency_select_spec.rb+++ b/modules/costs/spec/lib/costs/query_currency_select_spec.rb@@ -86,21 +86,15 @@ RSpec.describe Costs::QueryCurrencySelect, type: :model doquery = double("query")result = double("result")- allow(query)- .to receive(:results)- .and_return result-allow(result).to receive(:work_packages).and_return(WorkPackage.all)- allow(query)- .to receive(:group_by_join_statement)- .and_return(nil)-- allow(query)- .to receive(:group_by_statement)- .and_return("author_id")+ allow(query).to receive_messages(+ results: result,+ group_by_join_statement: nil,+ group_by_statement: "author_id"+ )expect(ActiveRecord::Base.connection.select_all(instance.summable.(query, true).to_sql).columns).to match_array %w(id material_costs)@@ -129,21 +123,15 @@ RSpec.describe Costs::QueryCurrencySelect, type: :model doquery = double("query")result = double("result")- allow(query)- .to receive(:results)- .and_return result-allow(result).to receive(:work_packages).and_return(WorkPackage.all)- allow(query)- .to receive(:group_by_join_statement)- .and_return(nil)-- allow(query)- .to receive(:group_by_statement)- .and_return("author_id")+ allow(query).to receive_messages(+ results: result,+ group_by_join_statement: nil,+ group_by_statement: "author_id"+ )expect(ActiveRecord::Base.connection.select_all(instance.summable.(query, true).to_sql).columns).to match_array %w(id labor_costs)