Skip to content

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

remove newlines from context descriptions

Ivan Kuchin0b87ed9b6a2d
diff --git a/modules/backlogs/spec/models/story_spec.rb b/modules/backlogs/spec/models/story_spec.rb
index 7afd89074d8..166c92f75bb 100644
--- a/modules/backlogs/spec/models/story_spec.rb
+++ b/modules/backlogs/spec/models/story_spec.rb
@@ -83,8 +83,8 @@ RSpec.describe Story do
describe "Class methods" do
describe "#backlogs" do
- describe "WITH one sprint
- WITH the sprint having 1 story" do
+ describe "WITH one sprint " \
+ "WITH the sprint having 1 story" do
before do
story1
end
@@ -92,10 +92,10 @@ RSpec.describe Story do
it { expect(Story.backlogs(project, [version.id])[version.id]).to contain_exactly(story1) }
end
- describe "WITH two sprints
- WITH two stories
- WITH one story per sprint
- WITH querying for the two sprints" do
+ describe "WITH two sprints " \
+ "WITH two stories " \
+ "WITH one story per sprint " \
+ "WITH querying for the two sprints" do
before do
version2
story1
@@ -107,10 +107,10 @@ RSpec.describe Story do
it { expect(Story.backlogs(project, [version.id, version2.id])[version2.id]).to contain_exactly(story2) }
end
- describe "WITH two sprints
- WITH two stories
- WITH one story per sprint
- WITH querying one sprints" do
+ describe "WITH two sprints " \
+ "WITH two stories " \
+ "WITH one story per sprint " \
+ "WITH querying one sprints" do
before do
version2
story1
@@ -123,11 +123,11 @@ RSpec.describe Story do
it { expect(Story.backlogs(project, [version.id])[version2.id]).to be_empty }
end
- describe "WITH two sprints
- WITH two stories
- WITH one story per sprint
- WITH querying for the two sprints
- WITH one sprint being in another project" do
+ describe "WITH two sprints " \
+ "WITH two stories " \
+ "WITH one story per sprint " \
+ "WITH querying for the two sprints " \
+ "WITH one sprint being in another project" do
before do
story1
@@ -145,8 +145,8 @@ RSpec.describe Story do
it { expect(Story.backlogs(project, [version.id, version2.id])[version2.id]).to be_empty }
end
- describe "WITH one sprint
- WITH the sprint having one story in this project and one story in another project" do
+ describe "WITH one sprint " \
+ "WITH the sprint having one story in this project and one story in another project" do
before do
version.sharing = "system"
version.save!
@@ -161,9 +161,9 @@ RSpec.describe Story do
it { expect(Story.backlogs(project, [version.id])[version.id]).to contain_exactly(story1) }
end
- describe "WITH one sprint
- WITH the sprint having two storys
- WITH one being the child of the other" do
+ describe "WITH one sprint " \
+ "WITH the sprint having two storys " \
+ "WITH one being the child of the other" do
before do
story1.parent_id = story2.id
@@ -173,9 +173,9 @@ RSpec.describe Story do
it { expect(Story.backlogs(project, [version.id])[version.id]).to contain_exactly(story1, story2) }
end
- describe "WITH one sprint
- WITH the sprint having one story
- WITH the story having a child task" do
+ describe "WITH one sprint " \
+ "WITH the sprint having one story " \
+ "WITH the story having a child task" do
before do
task.parent_id = story1.id
@@ -185,9 +185,9 @@ RSpec.describe Story do
it { expect(Story.backlogs(project, [version.id])[version.id]).to contain_exactly(story1) }
end
- describe "WITH one sprint
- WITH the sprint having one story and one task
- WITH the two having no connection" do
+ describe "WITH one sprint " \
+ "WITH the sprint having one story and one task " \
+ "WITH the two having no connection" do
before do
task
story1
diff --git a/modules/backlogs/spec/services/work_packages/update_service_version_inheritance_spec.rb b/modules/backlogs/spec/services/work_packages/update_service_version_inheritance_spec.rb
index 7da27199da3..96498fab92d 100644
--- a/modules/backlogs/spec/services/work_packages/update_service_version_inheritance_spec.rb
+++ b/modules/backlogs/spec/services/work_packages/update_service_version_inheritance_spec.rb
@@ -500,9 +500,9 @@ RSpec.describe WorkPackages::UpdateService, "version inheritance", type: :model
end
end
- describe "WITH a story as parent
- WITH the story having a non backlogs work_package as parent
- WITH a task as child" do
+ describe "WITH a story as parent " \
+ "WITH the story having a non backlogs work_package as parent " \
+ "WITH a task as child" do
before do
bug2.save!
story.parent_id = bug2.id
diff --git a/modules/bim/spec/features/bim_navigation_spec.rb b/modules/bim/spec/features/bim_navigation_spec.rb
index 45a1473b378..b9dbd4b93c8 100644
--- a/modules/bim/spec/features/bim_navigation_spec.rb
+++ b/modules/bim/spec/features/bim_navigation_spec.rb
@@ -141,8 +141,8 @@ RSpec.describe "BIM navigation spec", :js, with_config: { edition: "bim" } do
card_view.expect_work_package_not_listed work_package
end
- it 'after going to the full view with a selected tab,
- the same tab should be opened in full screen view and after going back to details view(see #33747)' do
+ it "after going to the full view with a selected tab, " \
+ "the same tab should be opened in full screen view and after going back to details view(see #33747)" do
card_view.open_split_view_by_info_icon(work_package)
details_view.ensure_page_loaded
diff --git a/modules/budgets/spec/models/labor_budget_item_spec.rb b/modules/budgets/spec/models/labor_budget_item_spec.rb
index d86fec5a681..50d498d171e 100644
--- a/modules/budgets/spec/models/labor_budget_item_spec.rb
+++ b/modules/budgets/spec/models/labor_budget_item_spec.rb
@@ -80,8 +80,8 @@ RSpec.describe LaborBudgetItem do
it { expect(item.calculated_costs).to eq(rate.rate * item.hours) }
end
- describe "WHEN user, hours and rate are defined
- WHEN the user is deleted" do
+ describe "WHEN user, hours and rate are defined " \
+ "WHEN the user is deleted" do
before do
project.save!
item.hours = 5.0
@@ -192,8 +192,8 @@ RSpec.describe LaborBudgetItem do
project.enabled_module_names = project.enabled_module_names << "costs"
end
- describe "WHEN the item is assigned to the user
- WHEN the user has the view_own_hourly_rate permission" do
+ describe "WHEN the item is assigned to the user " \
+ "WHEN the user has the view_own_hourly_rate permission" do
before do
is_member(project, user, [:view_own_hourly_rate])
@@ -203,8 +203,8 @@ RSpec.describe LaborBudgetItem do
it { expect(item.costs_visible_by?(user)).to be_truthy }
end
- describe "WHEN the item is assigned to the user
- WHEN the user lacks permissions" do
+ describe "WHEN the item is assigned to the user " \
+ "WHEN the user lacks permissions" do
before do
is_member(project, user, [])
@@ -214,8 +214,8 @@ RSpec.describe LaborBudgetItem do
it { expect(item.costs_visible_by?(user)).to be_falsey }
end
- describe "WHEN the item is assigned to another user
- WHEN the user has the view_hourly_rates permission" do
+ describe "WHEN the item is assigned to another user " \
+ "WHEN the user has the view_hourly_rates permission" do
before do
is_member(project, user2, [:view_hourly_rates])
@@ -225,8 +225,8 @@ RSpec.describe LaborBudgetItem do
it { expect(item.costs_visible_by?(user2)).to be_truthy }
end
- describe "WHEN the item is assigned to another user
- WHEN the user has the view_hourly_rates permission in another project" do
+ describe "WHEN the item is assigned to another user " \
+ "WHEN the user has the view_hourly_rates permission in another project" do
before do
is_member(project2, user2, [:view_hourly_rates])
diff --git a/modules/costs/spec/controllers/costlog_controller_spec.rb b/modules/costs/spec/controllers/costlog_controller_spec.rb
index 7f0782dae5d..0355973afc1 100644
--- a/modules/costs/spec/controllers/costlog_controller_spec.rb
+++ b/modules/costs/spec/controllers/costlog_controller_spec.rb
@@ -124,8 +124,8 @@ RSpec.describe CostlogController do
it_behaves_like "successful new"
end
- describe "WHEN user allowed to create new cost_entry
- WHEN a default cost_type exists" do
+ describe "WHEN user allowed to create new cost_entry " \
+ "WHEN a default cost_type exists" do
let(:expected_cost_type) { cost_type }
before do
@@ -189,8 +189,8 @@ RSpec.describe CostlogController do
it_behaves_like "successful edit"
end
- describe "WHEN the user is allowed to edit cost_entries
- WHEN trying to edit a not own cost_entry" do
+ describe "WHEN the user is allowed to edit cost_entries " \
+ "WHEN trying to edit a not own cost_entry" do
before do
grant_current_user_permissions user, [:edit_cost_entries]
@@ -209,8 +209,8 @@ RSpec.describe CostlogController do
it_behaves_like "successful edit"
end
- describe "WHEN the user is allowed to edit own cost_entries
- WHEN trying to edit a not own cost_entry" do
+ describe "WHEN the user is allowed to edit own cost_entries " \
+ "WHEN trying to edit a not own cost_entry" do
before do
grant_current_user_permissions user, [:edit_own_cost_entries]
@@ -229,8 +229,8 @@ RSpec.describe CostlogController do
it_behaves_like "forbidden edit"
end
- describe "WHEN the user is allowed to edit cost_entries
- WHEN the cost_entry is associated to a different project" do
+ describe "WHEN the user is allowed to edit cost_entries " \
+ "WHEN the cost_entry is associated to a different project" do
before do
grant_current_user_permissions user, [:edit_cost_entries]
@@ -244,8 +244,8 @@ RSpec.describe CostlogController do
it_behaves_like "forbidden edit"
end
- describe "WHEN the user is allowed to edit cost_entries
- WHEN the provided id is invalid" do
+ describe "WHEN the user is allowed to edit cost_entries " \
+ "WHEN the provided id is invalid" do
before do
grant_current_user_permissions user, [:edit_cost_entries]
@@ -333,8 +333,8 @@ RSpec.describe CostlogController do
it_behaves_like "successful create"
end
- describe "WHEN the user is allowed to create cost_entries
- WHEN no date is specified" do
+ describe "WHEN the user is allowed to create cost_entries " \
+ "WHEN no date is specified" do
let(:expected_spent_on) { Date.today }
before do
@@ -346,9 +346,9 @@ RSpec.describe CostlogController do
it_behaves_like "successful create"
end
- describe "WHEN the user is allowed to create cost_entries
- WHEN a non existing cost_type_id is specified
- WHEN no default cost_type is defined" do
+ describe "WHEN the user is allowed to create cost_entries " \
+ "WHEN a non existing cost_type_id is specified " \
+ "WHEN no default cost_type is defined" do
let(:expected_cost_type) { nil }
before do
@@ -359,9 +359,9 @@ RSpec.describe CostlogController do
it_behaves_like "invalid create"
end
- describe "WHEN the user is allowed to create cost_entries
- WHEN a non existing cost_type_id is specified
- WHEN a default cost_type is defined" do
+ describe "WHEN the user is allowed to create cost_entries " \
+ "WHEN a non existing cost_type_id is specified " \
+ "WHEN a default cost_type is defined" do
let(:expected_cost_type) { nil }
before do
@@ -374,9 +374,9 @@ RSpec.describe CostlogController do
it_behaves_like "invalid create"
end
- describe "WHEN the user is allowed to create cost_entries
- WHEN no cost_type is specified
- WHEN a default cost_type is defined" do
+ describe "WHEN the user is allowed to create cost_entries " \
+ "WHEN no cost_type is specified " \
+ "WHEN a default cost_type is defined" do
let(:expected_cost_type) { nil }
before do
@@ -389,9 +389,9 @@ RSpec.describe CostlogController do
it_behaves_like "invalid create"
end
- describe "WHEN the user is allowed to create cost_entries
- WHEN no cost_type is specified
- WHEN no default cost_type is defined" do
+ describe "WHEN the user is allowed to create cost_entries " \
+ "WHEN no cost_type is specified " \
+ "WHEN no default cost_type is defined" do
let(:expected_cost_type) { nil }
before do
@@ -402,8 +402,8 @@ RSpec.describe CostlogController do
it_behaves_like "invalid create"
end
- describe "WHEN the user is allowed to create cost_entries
- WHEN the cost_type id provided belongs to an inactive cost_type" do
+ describe "WHEN the user is allowed to create cost_entries " \
+ "WHEN the cost_type id provided belongs to an inactive cost_type" do
before do
grant_current_user_permissions user, [:log_costs]
cost_type.deleted_at = Date.today
@@ -413,9 +413,9 @@ RSpec.describe CostlogController do
it_behaves_like "invalid create"
end
- describe "WHEN the user is allowed to create cost_entries
- WHEN the user is allowed to log cost for someone else and is doing so
- WHEN the other user is a member of the project" do
+ describe "WHEN the user is allowed to create cost_entries " \
+ "WHEN the user is allowed to log cost for someone else and is doing so " \
+ "WHEN the other user is a member of the project" do
before do
grant_current_user_permissions user, []
grant_current_user_permissions user2, [:log_costs]
@@ -426,9 +426,9 @@ RSpec.describe CostlogController do
it_behaves_like "successful create"
end
- describe "WHEN the user is allowed to create cost_entries
- WHEN the user is allowed to log cost for someone else and is doing so
- WHEN the other user isn't a member of the project" do
+ describe "WHEN the user is allowed to create cost_entries " \
+ "WHEN the user is allowed to log cost for someone else and is doing so " \
+ "WHEN the other user isn't a member of the project" do
before do
grant_current_user_permissions user2, [:log_costs]
@@ -438,8 +438,8 @@ RSpec.describe CostlogController do
it_behaves_like "invalid create"
end
- describe "WHEN the user is allowed to create cost_entries
- WHEN the id of an work_package not included in the provided project is provided" do
+ describe "WHEN the user is allowed to create cost_entries " \
+ "WHEN the id of an work_package not included in the provided project is provided" do
let(:project2) { create(:project_with_types) }
let(:work_package2) do
create(:work_package, project: project2,
@@ -457,8 +457,8 @@ RSpec.describe CostlogController do
it_behaves_like "invalid create"
end
- describe "WHEN the user is allowed to create cost_entries
- WHEN no work_package_id is provided" do
+ describe "WHEN the user is allowed to create cost_entries " \
+ "WHEN no work_package_id is provided" do
let(:expected_work_package) { nil }
before do
@@ -470,8 +470,8 @@ RSpec.describe CostlogController do
it_behaves_like "invalid create"
end
- describe "WHEN the user is allowed to create own cost_entries
- WHEN the user is trying to log costs for somebody else" do
+ describe "WHEN the user is allowed to create own cost_entries " \
+ "WHEN the user is trying to log costs for somebody else" do
before do
grant_current_user_permissions user2, [:log_own_costs]
@@ -543,8 +543,8 @@ RSpec.describe CostlogController do
it { expect(response.response_code).to eq(403) }
end
- describe "WHEN the user is allowed to update cost_entries
- WHEN updating:
+ describe "WHEN the user is allowed to update cost_entries " \
+ "WHEN updating:
work_package_id
user_id
units
@@ -577,8 +577,8 @@ RSpec.describe CostlogController do
it_behaves_like "successful update"
end
- describe "WHEN the user is allowed to update cost_entries
- WHEN updating nothing" do
+ describe "WHEN the user is allowed to update cost_entries " \
+ "WHEN updating nothing" do
before do
grant_current_user_permissions user, [:edit_cost_entries]
end
@@ -586,8 +586,8 @@ RSpec.describe CostlogController do
it_behaves_like "successful update"
end
- describe "WHEN the user is allowed to update own cost_entries
- WHEN updating something" do
+ describe "WHEN the user is allowed to update own cost_entries " \
+ "WHEN updating something" do
let(:expected_units) { cost_entry.units + 20 }
before do
@@ -599,9 +599,9 @@ RSpec.describe CostlogController do
it_behaves_like "successful update"
end
- describe "WHEN the user is allowed to update cost_entries
- WHEN updating the user
- WHEN the new user isn't a member of the project" do
+ describe "WHEN the user is allowed to update cost_entries " \
+ "WHEN updating the user " \
+ "WHEN the new user isn't a member of the project" do
let(:user2) { create(:user) }
let(:expected_user) { user2 }
@@ -614,9 +614,9 @@ RSpec.describe CostlogController do
it_behaves_like "invalid update"
end
- describe "WHEN the user is allowed to update cost_entries
- WHEN updating the work_package
- WHEN the new work_package isn't an work_package of the current project" do
+ describe "WHEN the user is allowed to update cost_entries " \
+ "WHEN updating the work_package " \
+ "WHEN the new work_package isn't an work_package of the current project" do
let(:project2) { create(:project_with_types) }
let(:work_package2) do
create(:work_package, project: project2,
@@ -633,9 +633,9 @@ RSpec.describe CostlogController do
it_behaves_like "invalid update"
end
- describe "WHEN the user is allowed to update cost_entries
- WHEN updating the work_package
- WHEN the new work_package_id isn't existing" do
+ describe "WHEN the user is allowed to update cost_entries " \
+ "WHEN updating the work_package " \
+ "WHEN the new work_package_id isn't existing" do
let(:expected_work_package) { nil }
before do
@@ -647,9 +647,9 @@ RSpec.describe CostlogController do
it_behaves_like "invalid update"
end
- describe "WHEN the user is allowed to update cost_entries
- WHEN updating the cost_type
- WHEN the new cost_type is deleted" do
+ describe "WHEN the user is allowed to update cost_entries " \
+ "WHEN updating the cost_type " \
+ "WHEN the new cost_type is deleted" do
let(:expected_cost_type) { create(:cost_type, deleted_at: Date.today) }
before do
@@ -661,9 +661,9 @@ RSpec.describe CostlogController do
it_behaves_like "invalid update"
end
- describe "WHEN the user is allowed to update cost_entries
- WHEN updating the cost_type
- WHEN the new cost_type doesn't exist" do
+ describe "WHEN the user is allowed to update cost_entries " \
+ "WHEN updating the cost_type " \
+ "WHEN the new cost_type doesn't exist" do
let(:expected_cost_type) { nil }
before do
@@ -675,9 +675,9 @@ RSpec.describe CostlogController do
it_behaves_like "invalid update"
end
- describe "WHEN the user is allowed to update own cost_entries and not all
- WHEN updating own cost entry
- WHEN updating the user" do
+ describe "WHEN the user is allowed to update own cost_entries and not all " \
+ "WHEN updating own cost entry " \
+ "WHEN updating the user" do
let(:user3) { create(:user) }
before do
@@ -689,9 +689,9 @@ RSpec.describe CostlogController do
it_behaves_like "forbidden update"
end
- describe "WHEN the user is allowed to update own cost_entries and not all
- WHEN updating foreign cost_entry
- WHEN updating something" do
+ describe "WHEN the user is allowed to update own cost_entries and not all " \
+ "WHEN updating foreign cost_entry " \
+ "WHEN updating something" do
let(:user3) { create(:user) }
before do
diff --git a/modules/costs/spec/models/cost_entry_spec.rb b/modules/costs/spec/models/cost_entry_spec.rb
index b1b59367918..1cf777f95a5 100644
--- a/modules/costs/spec/models/cost_entry_spec.rb
+++ b/modules/costs/spec/models/cost_entry_spec.rb
@@ -99,9 +99,9 @@ RSpec.describe CostEntry do
describe "class" do
describe "#visible" do
- describe "WHEN having the view_cost_entries permission
- WHEN querying for a project
- WHEN a cost entry from another user is defined" do
+ describe "WHEN having the view_cost_entries permission " \
+ "WHEN querying for a project " \
+ "WHEN a cost entry from another user is defined" do
before do
is_member(project, user2, [:view_cost_entries])
@@ -111,9 +111,9 @@ RSpec.describe CostEntry do
it { expect(CostEntry.visible(user2, project)).to contain_exactly(cost_entry) }
end
- describe "WHEN not having the view_cost_entries permission
- WHEN querying for a project
- WHEN a cost entry from another user is defined" do
+ describe "WHEN not having the view_cost_entries permission " \
+ "WHEN querying for a project " \
+ "WHEN a cost entry from another user is defined" do
before do
is_member(project, user2, [])
@@ -123,9 +123,9 @@ RSpec.describe CostEntry do
it { expect(CostEntry.visible(user2, project)).to be_empty }
end
- describe "WHEN having the view_own_cost_entries permission
- WHEN querying for a project
- WHEN a cost entry from another user is defined" do
+ describe "WHEN having the view_own_cost_entries permission " \
+ "WHEN querying for a project " \
+ "WHEN a cost entry from another user is defined" do
before do
is_member(project, user2, [:view_own_cost_entries])
@@ -135,9 +135,9 @@ RSpec.describe CostEntry do
it { expect(CostEntry.visible(user2, project)).to be_empty }
end
- describe "WHEN having the view_own_cost_entries permission
- WHEN querying for a project
- WHEN a cost entry from the user is defined" do
+ describe "WHEN having the view_own_cost_entries permission " \
+ "WHEN querying for a project " \
+ "WHEN a cost entry from the user is defined" do
before do
is_member(project, cost_entry2.user, [:view_own_cost_entries])
@@ -322,15 +322,15 @@ RSpec.describe CostEntry do
it { expect(cost_entry).not_to be_valid }
end
- describe "WHEN the provided user is no member of the project
- WHEN the user is unchanged" do
+ describe "WHEN the provided user is no member of the project " \
+ "WHEN the user is unchanged" do
before { member.destroy }
it { expect(cost_entry).to be_valid }
end
- describe "WHEN the provided user is no member of the project
- WHEN the user changes" do
+ describe "WHEN the provided user is no member of the project " \
+ "WHEN the user changes" do
before do
cost_entry.user = user2
member.destroy
@@ -375,8 +375,8 @@ RSpec.describe CostEntry do
end
describe "#editable_by?" do
- describe "WHEN the user has the edit_cost_entries permission
- WHEN the cost entry is not created by the user" do
+ describe "WHEN the user has the edit_cost_entries permission " \
+ "WHEN the cost entry is not created by the user" do
before do
is_member(project, user2, [:edit_cost_entries])
@@ -386,8 +386,8 @@ RSpec.describe CostEntry do
it { expect(cost_entry.editable_by?(user2)).to be_truthy }
end
- describe "WHEN the user has the edit_cost_entries permission
- WHEN the cost entry is created by the user" do
+ describe "WHEN the user has the edit_cost_entries permission " \
+ "WHEN the cost entry is created by the user" do
before do
is_member(project, cost_entry2.user, [:edit_cost_entries])
end
@@ -395,8 +395,8 @@ RSpec.describe CostEntry do
it { expect(cost_entry2.editable_by?(cost_entry2.user)).to be_truthy }
end
- describe "WHEN the user has the edit_own_cost_entries permission
- WHEN the cost entry is created by the user" do
+ describe "WHEN the user has the edit_own_cost_entries permission " \
+ "WHEN the cost entry is created by the user" do
before do
is_member(project, cost_entry2.user, [:edit_own_cost_entries])
@@ -406,8 +406,8 @@ RSpec.describe CostEntry do
it { expect(cost_entry2.editable_by?(cost_entry2.user)).to be_truthy }
end
- describe "WHEN the user has the edit_own_cost_entries permission
- WHEN the cost entry is created by another user" do
+ describe "WHEN the user has the edit_own_cost_entries permission " \
+ "WHEN the cost entry is created by another user" do
before do
is_member(project, user2, [:edit_own_cost_entries])
@@ -417,8 +417,8 @@ RSpec.describe CostEntry do
it { expect(cost_entry.editable_by?(user2)).to be_falsey }
end
- describe "WHEN the user has no cost permission
- WHEN the cost entry is created by the user" do
+ describe "WHEN the user has no cost permission " \
+ "WHEN the cost entry is created by the user" do
before do
is_member(project, cost_entry2.user, [])
@@ -430,8 +430,8 @@ RSpec.describe CostEntry do
end
describe "#creatable_by?" do
- describe "WHEN the user has the log costs permission
- WHEN the cost entry is not associated to the user" do
+ describe "WHEN the user has the log costs permission " \
+ "WHEN the cost entry is not associated to the user" do
before do
is_member(project, user2, [:log_costs])
end
@@ -439,8 +439,8 @@ RSpec.describe CostEntry do
it { expect(cost_entry.creatable_by?(user2)).to be_truthy }
end
- describe "WHEN the user has the log_costs permission
- WHEN the cost entry is associated to user" do
+ describe "WHEN the user has the log_costs permission " \
+ "WHEN the cost entry is associated to user" do
before do
is_member(project, cost_entry2.user, [:log_costs])
end
@@ -448,8 +448,8 @@ RSpec.describe CostEntry do
it { expect(cost_entry2.creatable_by?(cost_entry2.user)).to be_truthy }
end
- describe "WHEN the user has the log own costs permission
- WHEN the cost entry is associated to the user" do
+ describe "WHEN the user has the log own costs permission " \
+ "WHEN the cost entry is associated to the user" do
before do
is_member(project, cost_entry2.user, [:log_own_costs])
end
@@ -457,8 +457,8 @@ RSpec.describe CostEntry do
it { expect(cost_entry2.creatable_by?(cost_entry2.user)).to be_truthy }
end
- describe "WHEN the user has the log_own_costs permission
- WHEN the cost entry is created by another user" do
+ describe "WHEN the user has the log_own_costs permission " \
+ "WHEN the cost entry is created by another user" do
before do
is_member(project, user2, [:log_own_costs])
end
@@ -466,8 +466,8 @@ RSpec.describe CostEntry do
it { expect(cost_entry.creatable_by?(user2)).to be_falsey }
end
- describe "WHEN the user has no cost permission
- WHEN the cost entry is associated to the user" do
+ describe "WHEN the user has no cost permission " \
+ "WHEN the cost entry is associated to the user" do
before do
is_member(project, cost_entry2.user, [])
end
@@ -477,8 +477,8 @@ RSpec.describe CostEntry do
end
describe "#costs_visible_by?" do
- describe "WHEN the user has the view_cost_rates permission
- WHEN the cost entry is not associated to the user" do
+ describe "WHEN the user has the view_cost_rates permission " \
+ "WHEN the cost entry is not associated to the user" do
before do
is_member(project, user2, [:view_cost_rates])
end
@@ -486,8 +486,8 @@ RSpec.describe CostEntry do
it { expect(cost_entry.costs_visible_by?(user2)).to be_truthy }
end
- describe "WHEN the user has the view_cost_rates permission in another project
- WHEN the cost entry is not associated to the user" do
+ describe "WHEN the user has the view_cost_rates permission in another project " \
+ "WHEN the cost entry is not associated to the user" do
before do
is_member(project2, user2, [:view_cost_rates])
end
@@ -495,9 +495,9 @@ RSpec.describe CostEntry do
it { expect(cost_entry.costs_visible_by?(user2)).to be_falsey }
end
- describe "WHEN the user lacks the view_cost_rates permission
- WHEN the cost entry is associated to the user
- WHEN the costs are overridden" do
+ describe "WHEN the user lacks the view_cost_rates permission " \
+ "WHEN the cost entry is associated to the user " \
+ "WHEN the costs are overridden" do
before do
is_member(project, cost_entry2.user, [])
cost_entry2.update_attribute(:overridden_costs, 1.0)
@@ -506,9 +506,9 @@ RSpec.describe CostEntry do
it { expect(cost_entry2.costs_visible_by?(cost_entry2.user)).to be_truthy }
end
- describe "WHEN the user lacks the view_cost_rates permission
- WHEN the cost entry is associated to the user
- WHEN the costs are not overridden" do
+ describe "WHEN the user lacks the view_cost_rates permission " \
+ "WHEN the cost entry is associated to the user " \
+ "WHEN the costs are not overridden" do
before do
is_member(project, cost_entry2.user, [])
end
diff --git a/modules/costs/spec/models/time_entry_spec.rb b/modules/costs/spec/models/time_entry_spec.rb
index 075d6f9956b..69aae4b86d9 100644
--- a/modules/costs/spec/models/time_entry_spec.rb
+++ b/modules/costs/spec/models/time_entry_spec.rb
@@ -293,8 +293,8 @@ RSpec.describe TimeEntry do
project.enabled_module_names = project.enabled_module_names << "costs"
end
- describe "WHEN the time_entry is assigned to the user
- WHEN the user has the view_own_hourly_rate permission" do
+ describe "WHEN the time_entry is assigned to the user " \
+ "WHEN the user has the view_own_hourly_rate permission" do
before do
is_member(project, user, [:view_own_hourly_rate])
@@ -304,8 +304,8 @@ RSpec.describe TimeEntry do
it { expect(time_entry.costs_visible_by?(user)).to be_truthy }
end
- describe "WHEN the time_entry is assigned to the user
- WHEN the user lacks permissions" do
+ describe "WHEN the time_entry is assigned to the user " \
+ "WHEN the user lacks permissions" do
before do
is_member(project, user, [])
@@ -315,8 +315,8 @@ RSpec.describe TimeEntry do
it { expect(time_entry.costs_visible_by?(user)).to be_falsey }
end
- describe "WHEN the time_entry is assigned to another user
- WHEN the user has the view_hourly_rates permission" do
+ describe "WHEN the time_entry is assigned to another user " \
+ "WHEN the user has the view_hourly_rates permission" do
before do
is_member(project, user2, [:view_hourly_rates])
@@ -326,8 +326,8 @@ RSpec.describe TimeEntry do
it { expect(time_entry.costs_visible_by?(user2)).to be_truthy }
end
- describe "WHEN the time_entry is assigned to another user
- WHEN the user has the view_hourly_rates permission in another project" do
+ describe "WHEN the time_entry is assigned to another user " \
+ "WHEN the user has the view_hourly_rates permission in another project" do
before do
is_member(project2, user2, [:view_hourly_rates])
@@ -360,7 +360,7 @@ RSpec.describe TimeEntry do
end
end
- context "when having the view_own_time_entries permission " +
+ context "when having the view_own_time_entries permission " \
"and being the owner of the time entry" do
before do
is_member(project, user, [:view_own_time_entries])
@@ -373,7 +373,7 @@ RSpec.describe TimeEntry do
end
end
- context "when having the view_own_time_entries permission " +
+ context "when having the view_own_time_entries permission " \
"and not being the owner of the time entry" do
before do
is_member(project, user, [:view_own_time_entries])
diff --git a/modules/costs/spec/models/user_spec.rb b/modules/costs/spec/models/user_spec.rb
index a46458f2583..a9423349679 100644
--- a/modules/costs/spec/models/user_spec.rb
+++ b/modules/costs/spec/models/user_spec.rb
@@ -48,8 +48,8 @@ RSpec.describe User do
project2.save!
end
- describe "WHEN user has the permission in one project
- WHEN not requesting for a specific project" do
+ describe "WHEN user has the permission in one project " \
+ "WHEN not requesting for a specific project" do
before do
is_member(project, user, [permission])
end
@@ -59,8 +59,8 @@ RSpec.describe User do
end
end
- describe "WHEN user has the permission in two projects
- WHEN not requesting for a specific project" do
+ describe "WHEN user has the permission in two projects " \
+ "WHEN not requesting for a specific project" do
before do
is_member(project, user, [permission])
is_member(project2, user, [permission])
@@ -76,8 +76,8 @@ RSpec.describe User do
end
end
- describe "WHEN user does not have the permission in any
- WHEN not requesting for a specific project" do
+ describe "WHEN user does not have the permission in any " \
+ "WHEN not requesting for a specific project" do
before do
user.save!
end
@@ -87,8 +87,8 @@ RSpec.describe User do
end
end
- describe "WHEN user has the permission in two projects
- WHEN requesting for a specific project" do
+ describe "WHEN user has the permission in two projects " \
+ "WHEN requesting for a specific project" do
before do
is_member(project, user, [permission])
is_member(project2, user, [permission])
@@ -106,8 +106,8 @@ RSpec.describe User do
project.save
end
- describe "WHEN providing a project
- WHEN providing attributes for an existing rate in the project" do
+ describe "WHEN providing a project " \
+ "WHEN providing attributes for an existing rate in the project" do
let(:new_attributes) do
{ project_hourly_rate.id.to_s => { valid_from: (Date.today + 1.day).to_s,
rate: (project_hourly_rate.rate + 5).to_s } }
@@ -137,8 +137,8 @@ RSpec.describe User do
end
end
- describe "WHEN providing a project
- WHEN providing attributes for an existing rate in another project" do
+ describe "WHEN providing a project " \
+ "WHEN providing attributes for an existing rate in another project" do
let(:new_attributes) do
{ project_hourly_rate.id.to_s => { valid_from: (Date.today + 1.day).to_s,
rate: (project_hourly_rate.rate + 5).to_s } }
@@ -166,8 +166,8 @@ RSpec.describe User do
end
end
- describe "WHEN providing a project
- WHEN not providing attributes" do
+ describe "WHEN providing a project " \
+ "WHEN not providing attributes" do
before do
project_hourly_rate.save!
user.rates.reload
@@ -180,8 +180,8 @@ RSpec.describe User do
end
end
- describe "WHEN not providing a project
- WHEN not providing attributes" do
+ describe "WHEN not providing a project " \
+ "WHEN not providing attributes" do
before do
default_hourly_rate.save!
user.default_rates.reload
diff --git a/modules/costs/spec/models/work_package/ask_before_destruction_spec.rb b/modules/costs/spec/models/work_package/ask_before_destruction_spec.rb
index 1d9f6493590..e94dfe4b314 100644
--- a/modules/costs/spec/models/work_package/ask_before_destruction_spec.rb
+++ b/modules/costs/spec/models/work_package/ask_before_destruction_spec.rb
@@ -195,8 +195,8 @@ RSpec.describe WorkPackage do
end
end
- describe 'w/ "reassign" as action
- w/ reassigning to a valid work_package' do
+ describe 'with "reassign" as action ' \
+ "with reassigning to a valid work_package" do
let(:action) do
WorkPackage.cleanup_associated_before_destructing_if_required(work_package, user, action: "reassign",
reassign_to_id: work_package2.id)
@@ -228,8 +228,8 @@ RSpec.describe WorkPackage do
end
end
- describe 'w/ "reassign" as action
- w/ reassigning to a work_package the user is not allowed to see' do
+ describe 'with "reassign" as action ' \
+ "with reassigning to a work_package the user is not allowed to see" do
let(:action) do
WorkPackage.cleanup_associated_before_destructing_if_required(work_package, user, action: "reassign",
reassign_to_id: work_package2.id)
@@ -251,8 +251,8 @@ RSpec.describe WorkPackage do
end
end
- describe 'w/ "reassign" as action
- w/ reassigning to a non existing work package' do
+ describe 'w/ "reassign" as action ' \
+ "w/ reassigning to a non existing work package" do
let(:action) do
WorkPackage.cleanup_associated_before_destructing_if_required(work_package, user, action: "reassign", reassign_to_id: 0)
end
@@ -269,8 +269,8 @@ RSpec.describe WorkPackage do
end
end
- describe 'w/ "reassign" as action
- w/o providing a reassignment id' do
+ describe 'w/ "reassign" as action ' \
+ "w/o providing a reassignment id" do
let(:action) { WorkPackage.cleanup_associated_before_destructing_if_required(work_package, user, action: "reassign") }
it "returns true" do
diff --git a/modules/gantt/spec/routing/gantt_routing_spec.rb b/modules/gantt/spec/routing/gantt_routing_spec.rb
index e592c27df9b..49db8bed1b8 100644
--- a/modules/gantt/spec/routing/gantt_routing_spec.rb
+++ b/modules/gantt/spec/routing/gantt_routing_spec.rb
@@ -44,8 +44,7 @@ RSpec.describe "Gantt routing" do
state: "create_new")
end
- it "connects GET /projects/:project_id/gantt/details/:id/:state" +
- " to gantt#index" do
+ it "connects GET /projects/:project_id/gantt/details/:id/:state to gantt#index" do
expect(get("/projects/1/gantt/details/2/overview"))
.to route_to(controller: "gantt/gantt",
action: "index",
diff --git a/modules/reporting/spec/requests/custom_field_cache_spec.rb b/modules/reporting/spec/requests/custom_field_cache_spec.rb
index 56bca39f8b8..440c923e53f 100644
--- a/modules/reporting/spec/requests/custom_field_cache_spec.rb
+++ b/modules/reporting/spec/requests/custom_field_cache_spec.rb
@@ -109,8 +109,8 @@ RSpec.describe "Custom field filter and group by caching" do
expect_filter_all_to_not_exist(custom_field)
end
- it 'allows for changing the db entries directly via SQL between requests \
- if no caching is done (this could also mean switching dbs)' do
+ it "allows for changing the db entries directly via SQL between requests " \
+ "if no caching is done (this could also mean switching dbs)" do
new_label = "our new label"
mock_cache_classes_setting_with(false)
diff --git a/modules/xls_export/spec/patches/work_packages_controller_patch_spec.rb b/modules/xls_export/spec/patches/work_packages_controller_patch_spec.rb
index 0b0c2b90270..fe33e0eb6e9 100644
--- a/modules/xls_export/spec/patches/work_packages_controller_patch_spec.rb
+++ b/modules/xls_export/spec/patches/work_packages_controller_patch_spec.rb
@@ -46,8 +46,8 @@ RSpec.describe WorkPackagesController, type: :controller do
let(:current_user) { create(:user) }
def self.requires_export_permission(&)
- describe 'w/ the export permission
- w/o a project' do
+ describe "with the export permission " \
+ "without a project" do
let(:project) { nil }
before do
@@ -59,8 +59,8 @@ RSpec.describe WorkPackagesController, type: :controller do
instance_eval(&)
end
- describe 'w/ the export permission
- w/ a project' do
+ describe "with the export permission " \
+ "with a project" do
before do
params[:project_id] = project.id
@@ -72,7 +72,7 @@ RSpec.describe WorkPackagesController, type: :controller do
instance_eval(&)
end
- describe "w/o the export permission" do
+ describe "without the export permission" do
let(:project) { nil }
before do
diff --git a/spec/controllers/members_controller_spec.rb b/spec/controllers/members_controller_spec.rb
index e96820c3f8d..1d0d0f02510 100644
--- a/spec/controllers/members_controller_spec.rb
+++ b/spec/controllers/members_controller_spec.rb
@@ -102,8 +102,7 @@ RSpec.describe MembersController do
before { login_as(user) }
- describe "WHEN the user is authorized
- WHEN a project is provided" do
+ describe "WHEN the user is authorized WHEN a project is provided" do
before do
role.add_permission! :manage_members
member
diff --git a/spec/controllers/versions_controller_spec.rb b/spec/controllers/versions_controller_spec.rb
index 9883e8ed6fd..b25b93fe99f 100644
--- a/spec/controllers/versions_controller_spec.rb
+++ b/spec/controllers/versions_controller_spec.rb
@@ -314,8 +314,7 @@ RSpec.describe VersionsController do
it { expect(version1.reload.effective_date).to eq(Date.today) }
end
- context "with valid params
- with a redirect url" do
+ context "with valid params with a redirect url" do
before do
login_as(user)
patch :update,
diff --git a/spec/controllers/work_packages_controller_spec.rb b/spec/controllers/work_packages_controller_spec.rb
index 92b40e4df7c..cf7eb77f2dd 100644
--- a/spec/controllers/work_packages_controller_spec.rb
+++ b/spec/controllers/work_packages_controller_spec.rb
@@ -59,8 +59,8 @@ RSpec.describe WorkPackagesController do
end
end
- describe 'w/ the permission to see the project
- w/ having the necessary permissions' do
+ describe "with the permission to see the project " \
+ "with having the necessary permissions" do
before do
expect(WorkPackage).to receive_message_chain("visible.find_by").and_return(stub_work_package)
end
@@ -70,8 +70,8 @@ RSpec.describe WorkPackagesController do
end
def self.requires_export_permission(&)
- describe 'w/ the export permission
- w/o a project' do
+ describe "with the export permission " \
+ "without a project" do
let(:project) { nil }
let(:other_project) { build_stubbed(:project) }
@@ -84,8 +84,8 @@ RSpec.describe WorkPackagesController do
instance_eval(&)
end
- describe 'w/ the export permission
- w/ a project' do
+ describe "with the export permission " \
+ "with a project" do
before do
params[:project_id] = project.id
diff --git a/spec/features/auth/login_spec.rb b/spec/features/auth/login_spec.rb
index 882c3335fea..8ea362bc2d0 100644
--- a/spec/features/auth/login_spec.rb
+++ b/spec/features/auth/login_spec.rb
@@ -80,8 +80,7 @@ RSpec.describe "Login" do
let(:force_password_change) { true }
let(:first_login) { true }
- it 'redirects to homescreen after forced password change
- (with validation error) and first login' do
+ it "redirects to homescreen after forced password change (with validation error) and first login" do
# first login
login_with(user.login, user_password)
expect(current_path).to eql signin_path
diff --git a/spec/helpers/pagination_helper_spec.rb b/spec/helpers/pagination_helper_spec.rb
index 211a598597b..f59dc2814ea 100644
--- a/spec/helpers/pagination_helper_spec.rb
+++ b/spec/helpers/pagination_helper_spec.rb
@@ -231,8 +231,7 @@ RSpec.describe PaginationHelper do
expect(session[:per_page]).to eq(2)
end
- it "should take the smallest value stored in the settings " +
- "if provided per_page param is not one of the configured" do
+ it "takes the smallest value stored in the settings if provided per_page param is not one of the configured" do
per_page = 4
expect(per_page_param(per_page:)).to eq(1)
diff --git a/spec/lib/journal_formatter/attachment_spec.rb b/spec/lib/journal_formatter/attachment_spec.rb
index 9affb4a9a66..7dd1bb29f5a 100644
--- a/spec/lib/journal_formatter/attachment_spec.rb
+++ b/spec/lib/journal_formatter/attachment_spec.rb
@@ -84,8 +84,7 @@ RSpec.describe OpenProject::JournalFormatter::Attachment do
it { expect(instance.render(key, [attachment.filename.to_s, nil])).to eq(expected) }
end
- describe "WITH the first value being nil, and the second an id as a string
- WITH specifying not to output html" do
+ describe "WITH the first value being nil, and the second an id as a string WITH specifying not to output html" do
let(:expected) do
I18n.t(:text_journal_attachment_added,
label: I18n.t(:"activerecord.models.attachment"),
@@ -95,8 +94,7 @@ RSpec.describe OpenProject::JournalFormatter::Attachment do
it { expect(instance.render(key, [nil, attachment.filename.to_s], html: false)).to eq(expected) }
end
- describe "WITH the first value being an id as string, and the second nil,
- WITH specifying not to output html" do
+ describe "WITH the first value being an id as string, and the second nil, WITH specifying not to output html" do
let(:expected) do
I18n.t(:text_journal_attachment_deleted,
label: I18n.t(:"activerecord.models.attachment"),
diff --git a/spec/lib/journal_formatter/diff_spec.rb b/spec/lib/journal_formatter/diff_spec.rb
index 2cff44e7f81..e3ad2b27c82 100644
--- a/spec/lib/journal_formatter/diff_spec.rb
+++ b/spec/lib/journal_formatter/diff_spec.rb
@@ -95,8 +95,7 @@ RSpec.describe OpenProject::JournalFormatter::Diff do
it { expect(instance.render(key, ["old value", "new value"])).to be_html_eql(expected) }
end
- describe "WITH the first value being a string, and the second a string
- WITH de as locale" do
+ describe "WITH the first value being a string, and the second a string WITH de as locale" do
let(:expected) do
I18n.t(:text_journal_changed_with_diff,
label: "<strong>Beschreibung</strong>",
@@ -124,8 +123,7 @@ RSpec.describe OpenProject::JournalFormatter::Diff do
it { expect(instance.render(key, ["old_value", nil])).to be_html_eql(expected) }
end
- describe "WITH the first value being nil, and the second a string
- WITH specifying not to output html" do
+ describe "WITH the first value being nil, and the second a string WITH specifying not to output html" do
let(:expected) do
I18n.t(:text_journal_set_with_diff,
label: key.camelize,
@@ -135,8 +133,7 @@ RSpec.describe OpenProject::JournalFormatter::Diff do
it { expect(instance.render(key, [nil, "new value"], html: false)).to be_html_eql(expected) }
end
- describe "WITH the first value being a string, and the second a string
- WITH specifying not to output html" do
+ describe "WITH the first value being a string, and the second a string WITH specifying not to output html" do
let(:expected) do
I18n.t(:text_journal_changed_with_diff,
label: key.camelize,
@@ -146,8 +143,7 @@ RSpec.describe OpenProject::JournalFormatter::Diff do
it { expect(instance.render(key, ["old value", "new value"], html: false)).to be_html_eql(expected) }
end
- describe "WITH the first value being a string, and the second a string
- WITH specifying to output a full url" do
+ describe "WITH the first value being a string, and the second a string WITH specifying to output a full url" do
let(:expected) do
I18n.t(:text_journal_changed_with_diff,
label: "<strong>#{key.camelize}</strong>",
diff --git a/spec/models/custom_field_spec.rb b/spec/models/custom_field_spec.rb
index bd0f403b65e..991f3f0abfe 100644
--- a/spec/models/custom_field_spec.rb
+++ b/spec/models/custom_field_spec.rb
@@ -73,8 +73,7 @@ RSpec.describe CustomField do
end
describe "#valid?" do
- describe "WITH a text field
- WITH minimum length blank" do
+ describe "WITH a text field WITH minimum length blank" do
before do
field.field_format = "text"
field.min_length = nil
@@ -83,8 +82,7 @@ RSpec.describe CustomField do
it { expect(field).not_to be_valid }
end
- describe "WITH a text field
- WITH maximum length blank" do
+ describe "WITH a text field WITH maximum length blank" do
before do
field.field_format = "text"
field.max_length = nil
@@ -93,8 +91,7 @@ RSpec.describe CustomField do
it { expect(field).not_to be_valid }
end
- describe "WITH a text field
- WITH minimum length not an integer" do
+ describe "WITH a text field WITH minimum length not an integer" do
before do
field.field_format = "text"
field.min_length = "a"
@@ -103,8 +100,7 @@ RSpec.describe CustomField do
it { expect(field).not_to be_valid }
end
- describe "WITH a text field
- WITH maximum length not an integer" do
+ describe "WITH a text field WITH maximum length not an integer" do
before do
field.field_format = "text"
field.max_length = "a"
@@ -113,8 +109,7 @@ RSpec.describe CustomField do
it { expect(field).not_to be_valid }
end
- describe "WITH a text field
- WITH minimum length greater than maximum length" do
+ describe "WITH a text field WITH minimum length greater than maximum length" do
before do
field.field_format = "text"
field.min_length = 2
@@ -124,8 +119,7 @@ RSpec.describe CustomField do
it { expect(field).not_to be_valid }
end
- describe "WITH a text field
- WITH negative minimum length" do
+ describe "WITH a text field WITH negative minimum length" do
before do
field.field_format = "text"
field.min_length = -2
@@ -134,8 +128,7 @@ RSpec.describe CustomField do
it { expect(field).not_to be_valid }
end
- describe "WITH a text field
- WITH negative maximum length" do
+ describe "WITH a text field WITH negative maximum length" do
before do
field.field_format = "text"
field.max_length = -2
@@ -144,8 +137,7 @@ RSpec.describe CustomField do
it { expect(field).not_to be_valid }
end
- describe "WITH a text field
- WITH an invalid regexp" do
+ describe "WITH a text field WITH an invalid regexp" do
before do
field.field_format = "text"
field.regexp = "[0-9}"
@@ -157,8 +149,7 @@ RSpec.describe CustomField do
end
end
- describe "WITH a list field
- WITHOUT a custom option" do
+ describe "WITH a list field WITHOUT a custom option" do
before do
field.field_format = "list"
end
@@ -169,8 +160,7 @@ RSpec.describe CustomField do
end
end
- describe "WITH a list field
- WITH a custom option" do
+ describe "WITH a list field WITH a custom option" do
before do
field.field_format = "list"
field.custom_options.build(value: "some value")
diff --git a/spec/models/projects/allowed_to_scope_spec.rb b/spec/models/projects/allowed_to_scope_spec.rb
index 38e5f3173ab..8606beb0593 100644
--- a/spec/models/projects/allowed_to_scope_spec.rb
+++ b/spec/models/projects/allowed_to_scope_spec.rb
@@ -89,8 +89,8 @@ RSpec.describe Project, "allowed to" do
user.save!
end
- context 'with the user being member
- with the role having the permission' do
+ context "with the user being member " \
+ "with the role having the permission" do
before do
non_member_role.save!
member.save!
@@ -99,9 +99,9 @@ RSpec.describe Project, "allowed to" do
it_behaves_like "includes the project"
end
- context 'with the user being member
- with the role having the permission
- without the project being active' do
+ context "with the user being member " \
+ "with the role having the permission " \
+ "without the project being active" do
let(:project_status) { false }
before do
@@ -111,8 +111,8 @@ RSpec.describe Project, "allowed to" do
it_behaves_like "is empty"
end
- context 'with the user being member
- without the role having the permission' do
+ context "with the user being member " \
+ "without the role having the permission" do
let(:permissions) { [] }
before do
@@ -122,14 +122,14 @@ RSpec.describe Project, "allowed to" do
it_behaves_like "is empty"
end
- context 'without the user being member
- with the role having the permission' do
+ context "without the user being member " \
+ "with the role having the permission" do
it_behaves_like "is empty"
end
- context 'with the user being member
- with the role having the permission
- without the associated module being active' do
+ context "with the user being member " \
+ "with the role having the permission " \
+ "without the associated module being active" do
before do
member.save!
project.enabled_modules = []
@@ -138,8 +138,8 @@ RSpec.describe Project, "allowed to" do
it_behaves_like "is empty"
end
- context 'with the user being member
- with the permission being public' do
+ context "with the user being member " \
+ "with the permission being public" do
before do
member.save!
end
@@ -149,9 +149,9 @@ RSpec.describe Project, "allowed to" do
end
end
- context 'with the user being member
- with the permission being public
- without the associated module being active' do
+ context "with the user being member " \
+ "with the permission being public " \
+ "without the associated module being active" do
before do
member.save!
project.enabled_modules = []
@@ -162,9 +162,9 @@ RSpec.describe Project, "allowed to" do
end
end
- context 'with the user being member
- with the permission being public and not module bound
- with no module being active' do
+ context "with the user being member " \
+ "with the permission being public and not module bound " \
+ "with no module being active" do
before do
member.save!
project.enabled_modules = []
@@ -175,10 +175,10 @@ RSpec.describe Project, "allowed to" do
end
end
- context 'with the user being member
- without the permission being module bound
- with the role having the permission
- with no module active' do
+ context "with the user being member " \
+ "without the permission being module bound " \
+ "with the role having the permission " \
+ "with no module active" do
let(:permissions) { [non_module_action] }
before do
@@ -190,10 +190,10 @@ RSpec.describe Project, "allowed to" do
end
end
- context 'with the user being member
- without the permission being module bound
- without the role having the permission
- with no module active' do
+ context "with the user being member " \
+ "without the permission being module bound " \
+ "without the role having the permission " \
+ "with no module active" do
let(:permissions) { [] }
before do
@@ -224,8 +224,8 @@ RSpec.describe Project, "allowed to" do
it_behaves_like "is empty"
end
- context 'without the project being active
- with the permission being public' do
+ context "without the project being active " \
+ "with the permission being public" do
let(:project_status) { false }
it "is empty" do
@@ -319,8 +319,8 @@ RSpec.describe Project, "allowed to" do
end
end
- context 'with the anonymous role having the permission
- without the project being active' do
+ context "with the anonymous role having the permission " \
+ "without the project being active" do
let(:project_status) { false }
it "is empty" do
@@ -342,8 +342,8 @@ RSpec.describe Project, "allowed to" do
end
end
- context 'with the permission being public
- with the associated module not being active' do
+ context "with the permission being public " \
+ "with the associated module not being active" do
before do
project.enabled_modules = []
end
@@ -353,8 +353,8 @@ RSpec.describe Project, "allowed to" do
end
end
- context 'with the permission being public and not module bound
- with no module being active' do
+ context "with the permission being public and not module bound " \
+ "with no module being active" do
before do
project.enabled_modules = []
end
@@ -373,8 +373,8 @@ RSpec.describe Project, "allowed to" do
member.save!
end
- context 'with the role not having the permission
- with non member having the permission' do
+ context "with the role not having the permission " \
+ "with non member having the permission" do
let(:permissions) { [] }
let(:non_member_permissions) { [action] }
@@ -393,15 +393,15 @@ RSpec.describe Project, "allowed to" do
it_behaves_like "includes the project"
end
- context 'with the non member role having the permission
- without the project being active' do
+ context "with the non member role having the permission " \
+ "without the project being active" do
let(:project_status) { false }
it_behaves_like "is empty"
end
- context 'with the permission being public and not module bound
- without the project being active' do
+ context "with the permission being public and not module bound " \
+ "without the project being active" do
let(:project_status) { false }
it "is empty" do
@@ -421,8 +421,8 @@ RSpec.describe Project, "allowed to" do
end
end
- context 'with the permission being public
- with the module not being active' do
+ context "with the permission being public " \
+ "with the module not being active" do
before do
project.enabled_modules = []
end
@@ -432,8 +432,8 @@ RSpec.describe Project, "allowed to" do
end
end
- context 'with the permission being public and not module bound
- with no module active' do
+ context "with the permission being public and not module bound " \
+ "with no module active" do
before do
project.enabled_modules = []
end
diff --git a/spec/models/queries/work_packages/filter/subproject_filter_spec.rb b/spec/models/queries/work_packages/filter/subproject_filter_spec.rb
index 8527d9a8c2a..25de5f213e6 100644
--- a/spec/models/queries/work_packages/filter/subproject_filter_spec.rb
+++ b/spec/models/queries/work_packages/filter/subproject_filter_spec.rb
@@ -52,8 +52,7 @@ RSpec.describe Queries::WorkPackages::Filter::SubprojectFilter do
end
describe "#available?" do
- context 'with a project and that project not being a leaf
- and the project having visible descendants' do
+ context "with a project and that project not being a leaf and the project having visible descendants" do
let(:subproject) { build_stubbed(:project) }
let(:projects) { [subproject] }
@@ -91,8 +90,7 @@ RSpec.describe Queries::WorkPackages::Filter::SubprojectFilter do
end
end
- context 'with a project and that project not being a leaf
- but the user not seeing any of the descendants' do
+ context "with a project and that project not being a leaf but the user not seeing any of the descendants" do
before do
allow(project)
.to receive(:leaf?)
diff --git a/spec/models/query/results_spec.rb b/spec/models/query/results_spec.rb
index 97bff215992..c9941679f0a 100644
--- a/spec/models/query/results_spec.rb
+++ b/spec/models/query/results_spec.rb
@@ -525,76 +525,65 @@ RSpec.describe Query::Results do
end
end
- context 'with the wp having true for the cf
- and filtering for true' do
- it_behaves_like "returns the wp"
- end
+ context "with the wp having true for the cf" do
+ context "and filtering for true" do
+ it_behaves_like "returns the wp"
+ end
- context 'with the wp having true for the cf
- and filtering for false' do
- let(:filter_value) { "f" }
+ context "and filtering for false" do
+ let(:filter_value) { "f" }
- it_behaves_like "is empty"
+ it_behaves_like "is empty"
+ end
end
- context 'with the wp having false for the cf
- and filtering for false' do
+ context "with the wp having false for the cf" do
let(:value) { "f" }
- let(:filter_value) { "f" }
- it_behaves_like "returns the wp"
- end
+ context "and filtering for true" do
+ it_behaves_like "is empty"
+ end
- context 'with the wp having false for the cf
- and filtering for true' do
- let(:value) { "f" }
+ context "and filtering for false" do
+ let(:filter_value) { "f" }
- it_behaves_like "is empty"
+ it_behaves_like "returns the wp"
+ end
end
- context 'with the wp having no value for the cf
- and filtering for true' do
+ context "with the wp having no value for the cf" do
let(:custom_value) { nil }
- it_behaves_like "is empty"
- end
+ context "and filtering for true" do
+ it_behaves_like "is empty"
+ end
- context 'with the wp having no value for the cf
- and filtering for false' do
- let(:custom_value) { nil }
- let(:filter_value) { "f" }
+ context "and filtering for false" do
+ let(:filter_value) { "f" }
- it_behaves_like "returns the wp"
- end
+ it_behaves_like "returns the wp"
- context 'with the wp having no value for the cf
- and filtering for false
- and the cf not being active for the type' do
- let(:custom_value) { nil }
- let(:filter_value) { "f" }
- let(:bool_cf) do
- create(:boolean_wp_custom_field,
- is_filter: true,
- types: [work_package1.type])
- end
+ context "and the cf not being active for the type" do
+ let(:bool_cf) do
+ create(:boolean_wp_custom_field,
+ is_filter: true,
+ types: [work_package1.type])
+ end
- it_behaves_like "is empty"
- end
+ it_behaves_like "is empty"
+ end
- context 'with the wp having no value for the cf
- and filtering for false
- and the cf not being active in the project
- and the cf being for all' do
- let(:custom_value) { nil }
- let(:filter_value) { "f" }
- let(:bool_cf) do
- create(:boolean_wp_custom_field,
- is_filter: true,
- is_for_all: true,
- projects: [work_package1.project])
- end
+ context "and the cf not being active in the project and the cf being for all" do
+ let(:bool_cf) do
+ create(:boolean_wp_custom_field,
+ is_filter: true,
+ is_for_all: true,
+ projects: [work_package1.project])
+ end
- it_behaves_like "is empty"
+ it_behaves_like "is empty"
+ end
+ end
end
end
end
diff --git a/spec/models/users/allowed_scope_spec.rb b/spec/models/users/allowed_scope_spec.rb
index 4db28c62450..1b3dabf97bb 100644
--- a/spec/models/users/allowed_scope_spec.rb
+++ b/spec/models/users/allowed_scope_spec.rb
@@ -52,10 +52,10 @@ RSpec.describe User, "allowed scope" do
ProjectRole.non_member
end
- context 'w/ the context being a project
- w/o the project being public
- w/ the user being member in the project
- w/ the role having the necessary permission' do
+ context "with the context being a project " \
+ "without the project being public " \
+ "with the user being member in the project " \
+ "with the role having the necessary permission" do
before do
role.add_permission! action
@@ -67,10 +67,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/o the project being public
- w/o the user being member in the project
- w/ the user being admin' do
+ context "with the context being a project " \
+ "without the project being public " \
+ "without the user being member in the project " \
+ "with the user being admin" do
before do
user.update_attribute(:admin, true)
end
@@ -80,11 +80,11 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/o the project being public
- w/o the user being member in the project
- w/ the user being admin
- w/ the action not granted to admins' do
+ context "with the context being a project " \
+ "without the project being public " \
+ "without the user being member in the project " \
+ "with the user being admin " \
+ "with the action not granted to admins" do
let(:action) { :work_package_assigned }
before do
@@ -96,10 +96,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/o the project being public
- w/ the user being member in the project
- w/o the role having the necessary permission' do
+ context "with the context being a project " \
+ "without the project being public " \
+ "with the user being member in the project " \
+ "without the role having the necessary permission" do
before do
role.save!
member.save!
@@ -110,10 +110,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/o the project being public
- w/o the user being member in the project
- w/ the role having the necessary permission' do
+ context "with the context being a project " \
+ "without the project being public " \
+ "without the user being member in the project " \
+ "with the role having the necessary permission" do
before do
role.add_permission! action
end
@@ -123,11 +123,11 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/o the project being public
- w/o the user being member in the project
- w/ the user being member in a different project
- w/ the role having the permission' do
+ context "with the context being a project " \
+ "without the project being public " \
+ "without the user being member in the project " \
+ "with the user being member in a different project " \
+ "with the role having the permission" do
before do
role.add_permission! action
@@ -140,11 +140,11 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/ the project being public
- w/o the user being member in the project
- w/ the user being member in a different project
- w/ the role having the permission' do
+ context "with the context being a project " \
+ "with the project being public " \
+ "without the user being member in the project " \
+ "with the user being member in a different project " \
+ "with the role having the permission" do
before do
role.add_permission! action
@@ -159,10 +159,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/ the project being public
- w/o the user being member in the project
- w/ the non member role having the necessary permission' do
+ context "with the context being a project " \
+ "with the project being public " \
+ "without the user being member in the project " \
+ "with the non member role having the necessary permission" do
before do
project.public = true
@@ -177,10 +177,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/ the project being public
- w/o the user being member in the project
- w/ the anonymous role having the necessary permission' do
+ context "with the context being a project " \
+ "with the project being public " \
+ "without the user being member in the project " \
+ "with the anonymous role having the necessary permission" do
before do
project.public = true
@@ -195,10 +195,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/ the project being public
- w/o the user being member in the project
- w/ the non member role having another permission' do
+ context "with the context being a project " \
+ "with the project being public " \
+ "without the user being member in the project " \
+ "with the non member role having another permission" do
before do
project.public = true
@@ -213,10 +213,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/ the project being private
- w/o the user being member in the project
- w/ the non member role having the permission' do
+ context "with the context being a project " \
+ "with the project being private " \
+ "without the user being member in the project " \
+ "with the non member role having the permission" do
before do
non_member = ProjectRole.non_member
non_member.add_permission! action
@@ -229,11 +229,11 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/ the project being public
- w/ the user being member in the project
- w/o the role having the necessary permission
- w/ the non member role having the permission' do
+ context "with the context being a project " \
+ "with the project being public " \
+ "with the user being member in the project " \
+ "without the role having the necessary permission " \
+ "with the non member role having the permission" do
before do
project.public = true
project.save
@@ -250,11 +250,11 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/o the project being public
- w/ the user being member in the project
- w/o the role having the permission
- w/ the permission being public' do
+ context "with the context being a project " \
+ "without the project being public " \
+ "with the user being member in the project " \
+ "without the role having the permission " \
+ "with the permission being public" do
before do
member.save!
end
@@ -264,11 +264,11 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/ the project being public
- w/o the user being member in the project
- w/o the role having the permission
- w/ the permission being public' do
+ context "with the context being a project " \
+ "with the project being public " \
+ "without the user being member in the project " \
+ "without the role having the permission " \
+ "with the permission being public" do
before do
project.public = true
project.save
@@ -280,11 +280,11 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/ the user being member in the project
- w/ asking for a certain permission
- w/ the permission belonging to a module
- w/o the module being active' do
+ context "with the context being a project " \
+ "with the user being member in the project " \
+ "with asking for a certain permission " \
+ "with the permission belonging to a module " \
+ "without the module being active" do
let(:permission) do
OpenProject::AccessControl.permissions.find { |p| p.project_module.present? }
end
@@ -301,11 +301,11 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/ the user being member in the project
- w/ asking for a certain permission
- w/ the permission belonging to a module
- w/ the module being active' do
+ context "with the context being a project " \
+ "with the user being member in the project " \
+ "with asking for a certain permission " \
+ "with the permission belonging to a module " \
+ "with the module being active" do
let(:permission) do
OpenProject::AccessControl.permissions.find { |p| p.project_module.present? }
end
@@ -322,11 +322,11 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ the context being a project
- w/ the user being member in the project
- w/ asking for a certain permission
- w/ the user having the permission in the project
- w/o the project being active' do
+ context "with the context being a project " \
+ "with the user being member in the project " \
+ "with asking for a certain permission " \
+ "with the user having the permission in the project " \
+ "without the project being active" do
before do
role.add_permission! action
member.save!
@@ -339,10 +339,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ only asking for members
- w/o the project being public
- w/ the user being member in the project
- w/ the role having the necessary permission' do
+ context "with only asking for members " \
+ "without the project being public " \
+ "with the user being member in the project " \
+ "with the role having the necessary permission" do
before do
role.add_permission! action
@@ -354,10 +354,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ only asking for members
- w/o the project being public
- w/o the user being member in the project
- w/ the user being admin' do
+ context "with only asking for members " \
+ "without the project being public " \
+ "without the user being member in the project " \
+ "with the user being admin" do
before do
user.update_attribute(:admin, true)
end
@@ -367,10 +367,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ only asking for members
- w/ the project being public
- w/ the user being member in the project
- w/ the role having the necessary permission' do
+ context "with only asking for members " \
+ "with the project being public " \
+ "with the user being member in the project " \
+ "with the role having the necessary permission" do
before do
project.update_attribute(:public, true)
@@ -384,10 +384,10 @@ RSpec.describe User, "allowed scope" do
end
end
- context 'w/ only asking for members
- w/ the project being public
- w/o the user being member in the project
- w/ the role having the necessary permission' do
+ context "with only asking for members " \
+ "with the project being public " \
+ "without the user being member in the project " \
+ "with the role having the necessary permission" do
before do
project.update_attribute(:public, true)
diff --git a/spec/models/version_spec.rb b/spec/models/version_spec.rb
index ecb5fa19995..f1d6e3fe409 100644
--- a/spec/models/version_spec.rb
+++ b/spec/models/version_spec.rb
@@ -134,8 +134,7 @@ RSpec.describe Version do
expect(version1 <=> version2).to be 1
end
- it "is -1 if the project name is equal
- and the version's name is alphabetically before the other's name" do
+ it "is -1 if the project name is equal and the version's name is alphabetically before the other's name" do
version1.project.name = version2.project.name
version1.name = "AAAA"
version2.name = "BBBB"
@@ -143,8 +142,7 @@ RSpec.describe Version do
expect(version1 <=> version2).to be -1
end
- it "is 1 if the project name is equal
- and the version's name is alphabetically after the other's name" do
+ it "is 1 if the project name is equal and the version's name is alphabetically after the other's name" do
version1.project.name = version2.project.name
version1.name = "BBBB"
version2.name = "AAAA"
@@ -177,8 +175,7 @@ RSpec.describe Version do
expect(version1 <=> version2).to be 1
end
- it "is -1 if the project name is equal
- and the version's name is alphabetically before the other's name ignoring case" do
+ it "is -1 if the project name is equal and the version's name is alphabetically before the other's name ignoring case" do
version1.project.name = version2.project.name
version1.name = "aaaa"
version2.name = "BBBB"
@@ -186,8 +183,7 @@ RSpec.describe Version do
expect(version1 <=> version2).to be -1
end
- it "is 1 if the project name is equal
- and the version's name is alphabetically after the other's name ignoring case" do
+ it "is 1 if the project name is equal and the version's name is alphabetically after the other's name ignoring case" do
version1.project.name = version2.project.name
version1.name = "BBBB"
version2.name = "aaaa"
diff --git a/spec/models/work_package/ask_before_destruction_spec.rb b/spec/models/work_package/ask_before_destruction_spec.rb
index f29a5db4aea..cec12b76f26 100644
--- a/spec/models/work_package/ask_before_destruction_spec.rb
+++ b/spec/models/work_package/ask_before_destruction_spec.rb
@@ -71,7 +71,7 @@ RSpec.describe WorkPackage do
end
describe "#cleanup_action_required_before_destructing?" do
- describe "w/ the work package having a time entry" do
+ describe "with the work package having a time entry" do
before do
work_package
time_entry
@@ -82,7 +82,7 @@ RSpec.describe WorkPackage do
end
end
- describe "w/ two work packages having a time entry" do
+ describe "with two work packages having a time entry" do
before do
work_package
time_entry
@@ -94,7 +94,7 @@ RSpec.describe WorkPackage do
end
end
- describe "w/o the work package having a time entry" do
+ describe "without the work package having a time entry" do
before do
work_package
end
@@ -106,7 +106,7 @@ RSpec.describe WorkPackage do
end
describe "#associated_classes_to_address_before_destructing?" do
- describe "w/ the work package having a time entry" do
+ describe "with the work package having a time entry" do
before do
work_package
time_entry
@@ -117,7 +117,7 @@ RSpec.describe WorkPackage do
end
end
- describe "w/o the work package having a time entry" do
+ describe "without the work package having a time entry" do
before do
work_package
end
@@ -135,7 +135,7 @@ RSpec.describe WorkPackage do
time_entry
end
- describe "w/o a cleanup being necessary" do
+ describe "without a cleanup being necessary" do
let(:action) { WorkPackage.cleanup_associated_before_destructing_if_required([work_package], user, action: "reassign") }
before do
@@ -147,7 +147,7 @@ RSpec.describe WorkPackage do
end
end
- describe 'w/ "destroy" as action' do
+ describe 'with "destroy" as action' do
let(:action) { WorkPackage.cleanup_associated_before_destructing_if_required([work_package], user, action: "destroy") }
it "returns true" do
@@ -162,7 +162,7 @@ RSpec.describe WorkPackage do
end
end
- describe "w/o an action" do
+ describe "without an action" do
let(:action) { WorkPackage.cleanup_associated_before_destructing_if_required([work_package], user) }
it "returns true" do
@@ -177,7 +177,7 @@ RSpec.describe WorkPackage do
end
end
- describe 'w/ "nullify" as action' do
+ describe 'with "nullify" as action' do
let(:action) { WorkPackage.cleanup_associated_before_destructing_if_required([work_package], user, action: "nullify") }
it "returns true" do
@@ -192,8 +192,8 @@ RSpec.describe WorkPackage do
end
end
- describe 'w/ "reassign" as action
- w/ reassigning to a valid work_package' do
+ describe 'with "reassign" as action ' \
+ "with reassigning to a valid work_package" do
context "with a single work package" do
let(:action) do
WorkPackage.cleanup_associated_before_destructing_if_required(work_package,
@@ -262,8 +262,8 @@ RSpec.describe WorkPackage do
end
end
- describe 'w/ "reassign" as action
- w/ reassigning to a work_package the user is not allowed to see' do
+ describe 'with "reassign" as action ' \
+ "with reassigning to a work_package the user is not allowed to see" do
let(:action) do
WorkPackage.cleanup_associated_before_destructing_if_required([work_package],
user,
@@ -287,8 +287,8 @@ RSpec.describe WorkPackage do
end
end
- describe 'w/ "reassign" as action
- w/ reassigning to a non existing work package' do
+ describe 'with "reassign" as action ' \
+ "with reassigning to a non existing work package" do
let(:action) do
WorkPackage.cleanup_associated_before_destructing_if_required([work_package],
user,
@@ -315,8 +315,8 @@ RSpec.describe WorkPackage do
end
end
- describe 'w/ "reassign" as action
- w/o providing a reassignment id' do
+ describe 'with "reassign" as action ' \
+ "without providing a reassignment id" do
let(:action) do
WorkPackage.cleanup_associated_before_destructing_if_required([work_package],
user,
@@ -342,7 +342,7 @@ RSpec.describe WorkPackage do
end
end
- describe "w/ an invalid option" do
+ describe "with an invalid option" do
let(:action) do
WorkPackage.cleanup_associated_before_destructing_if_required([work_package],
user,
@@ -354,7 +354,7 @@ RSpec.describe WorkPackage do
end
end
- describe "w/ nil as invalid option" do
+ describe "with nil as invalid option" do
let(:action) do
WorkPackage.cleanup_associated_before_destructing_if_required([work_package],
user,
diff --git a/spec/models/work_package/work_package_acts_as_searchable_spec.rb b/spec/models/work_package/work_package_acts_as_searchable_spec.rb
index 610d161d8a6..283cf6a0cc6 100644
--- a/spec/models/work_package/work_package_acts_as_searchable_spec.rb
+++ b/spec/models/work_package/work_package_acts_as_searchable_spec.rb
@@ -44,9 +44,9 @@ RSpec.describe WorkPackage, "acts_as_searchable" do
let(:user) { create(:user) }
describe "#search" do
- describe "w/ the user being logged in
- w/ searching for a matching string
- w/ being member with the appropriate permission" do
+ describe "with the user being logged in " \
+ "with searching for a matching string " \
+ "with being member with the appropriate permission" do
before do
work_package
allow(User).to receive(:current).and_return user
@@ -59,10 +59,10 @@ RSpec.describe WorkPackage, "acts_as_searchable" do
end
end
- describe "w/ the user being logged in
- w/ being member with the appropriate permission
- w/ searching for matching string
- w/ searching with an offset" do
+ describe "with the user being logged in " \
+ "with being member with the appropriate permission " \
+ "with searching for matching string " \
+ "with searching with an offset" do
# this offset recreates the way the time is transformed in the controller
# This will have to be cleaned up
let(:offset) { (work_package.created_at - 1.minute).strftime("%Y%m%d%H%M%S").to_time }
diff --git a/spec/models/work_packages/spent_time_spec.rb b/spec/models/work_packages/spent_time_spec.rb
index 4266406b77c..6358867d612 100644
--- a/spec/models/work_packages/spent_time_spec.rb
+++ b/spec/models/work_packages/spent_time_spec.rb
@@ -107,7 +107,7 @@ RSpec.describe WorkPackage, "spent_time" do
end
context "permissions" do
- it "counts the child if that child is in a project in which the user " +
+ it "counts the child if that child is in a project in which the user " \
"has the necessary permissions" do
create(:member,
user:,
@@ -119,7 +119,7 @@ RSpec.describe WorkPackage, "spent_time" do
expect(subject).to eql sum
end
- it "does not count the child if that child is in a project in which the user " +
+ it "does not count the child if that child is in a project in which the user " \
"lacks the view_time_entries permission" do
create(:member,
user:,
@@ -132,7 +132,7 @@ RSpec.describe WorkPackage, "spent_time" do
expect(subject).to eql sum
end
- it "does not count the child if that child is in a project in which the user " +
+ it "does not count the child if that child is in a project in which the user " \
"lacks the view_work_packages permission" do
create(:member,
user:,
diff --git a/spec/policies/query_policy_spec.rb b/spec/policies/query_policy_spec.rb
index 6daf177b93c..11dd1b2b894 100644
--- a/spec/policies/query_policy_spec.rb
+++ b/spec/policies/query_policy_spec.rb
@@ -130,8 +130,8 @@ RSpec.describe QueryPolicy, type: :controller do
expect(subject.allowed?(query, action)).to be_falsy
end
- it "is true if the user has the manage_public_query permission in the project " +
- "AND it is anothers query " +
+ it "is true if the user has the manage_public_query permission in the project " \
+ "AND it is anothers query " \
"AND the query is public" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :manage_public_queries, project: global ? build_stubbed(:project) : project
@@ -142,8 +142,8 @@ RSpec.describe QueryPolicy, type: :controller do
expect(subject.allowed?(query, action)).to be_truthy
end
- it "is false if the user lacks the manage_public_query permission in the project " +
- "AND it is anothers query " +
+ it "is false if the user lacks the manage_public_query permission in the project " \
+ "AND it is anothers query " \
"AND the query is public" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :save_queries, project: global ? build_stubbed(:project) : project
@@ -154,8 +154,8 @@ RSpec.describe QueryPolicy, type: :controller do
expect(subject.allowed?(query, action)).to be_falsy
end
- it "is false if the user has the manage_public_query permission in the project " +
- "AND it is anothers query " +
+ it "is false if the user has the manage_public_query permission in the project " \
+ "AND it is anothers query " \
"AND the query is not public" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :manage_public_queries, project: global ? build_stubbed(:project) : project
@@ -195,7 +195,7 @@ RSpec.describe QueryPolicy, type: :controller do
expect(subject.allowed?(query, action)).to be_truthy
end
- it "is false if the user has the save_query permission in the project " +
+ it "is false if the user has the save_query permission in the project " \
"AND the query is persisted" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :save_queries, project: global ? build_stubbed(:project) : project
@@ -222,7 +222,7 @@ RSpec.describe QueryPolicy, type: :controller do
expect(subject.allowed?(query, :publicize)).to be_falsy
end
- it "is true if the user has the manage_public_query permission in the project " +
+ it "is true if the user has the manage_public_query permission in the project " \
"AND it is his query" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :manage_public_queries, project: global ? build_stubbed(:project) : project
@@ -231,8 +231,8 @@ RSpec.describe QueryPolicy, type: :controller do
expect(subject.allowed?(query, :publicize)).to be_truthy
end
- it "is false if the user has the manage_public_query permission in the project " +
- "AND the query is not public " +
+ it "is false if the user has the manage_public_query permission in the project " \
+ "AND the query is not public " \
"AND it is not his query" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :manage_public_queries, project: global ? build_stubbed(:project) : project
@@ -259,8 +259,8 @@ RSpec.describe QueryPolicy, type: :controller do
expect(subject.allowed?(query, :depublicize)).to be_falsy
end
- it "is true if the user has the manage_public_query permission in the project " +
- "AND the query belongs to another user" +
+ it "is true if the user has the manage_public_query permission in the project " \
+ "AND the query belongs to another user" \
"AND the query is public" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :manage_public_queries, project: global ? build_stubbed(:project) : project
@@ -272,7 +272,7 @@ RSpec.describe QueryPolicy, type: :controller do
expect(subject.allowed?(query, :depublicize)).to be_truthy
end
- it "is false if the user has the manage_public_query permission in the project " +
+ it "is false if the user has the manage_public_query permission in the project " \
"AND the query is not public" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :manage_public_queries, project: global ? build_stubbed(:project) : project
@@ -341,7 +341,7 @@ RSpec.describe QueryPolicy, type: :controller do
expect(subject.allowed?(query, :reorder_work_packages)).to be_truthy
end
- it "is true if the user has the manage_public_query permission in the project " +
+ it "is true if the user has the manage_public_query permission in the project " \
"AND it is a public query" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :manage_public_queries, project: global ? build_stubbed(:project) : project
@@ -351,8 +351,8 @@ RSpec.describe QueryPolicy, type: :controller do
expect(subject.allowed?(query, :reorder_work_packages)).to be_truthy
end
- it "is false if the user has the manage_public_query permission in the project " +
- "AND the query is not public " +
+ it "is false if the user has the manage_public_query permission in the project " \
+ "AND the query is not public " \
"AND it is not his query" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :manage_public_queries, project: global ? build_stubbed(:project) : project
diff --git a/spec/policies/work_package_policy_spec.rb b/spec/policies/work_package_policy_spec.rb
index d95d3bc568a..f759096f80f 100644
--- a/spec/policies/work_package_policy_spec.rb
+++ b/spec/policies/work_package_policy_spec.rb
@@ -114,8 +114,7 @@ RSpec.describe WorkPackagePolicy, type: :controller do
expect(subject).to be_allowed(work_package, :comment)
end
- it 'is false if the user has the edit_work_packages permission
- but the work_package is unpersisted' do
+ it "is false if the user has the edit_work_packages permission but the work_package is unpersisted" do
mock_permissions_for(user) do |mock|
mock.allow_in_project :edit_work_packages, project:
end
diff --git a/spec/routing/work_packages_spec.rb b/spec/routing/work_packages_spec.rb
index 2b0b070ac2a..1a2d740d31e 100644
--- a/spec/routing/work_packages_spec.rb
+++ b/spec/routing/work_packages_spec.rb
@@ -76,8 +76,8 @@ RSpec.describe WorkPackagesController do
state: "5/overview")
end
- it "connects GET /projects/:project_id/work_packages/details/:id/:state" +
- " to work_packages#index" do
+ it "connects GET /projects/:project_id/work_packages/details/:id/:state " \
+ "to work_packages#index" do
expect(get("/projects/1/work_packages/details/2/overview"))
.to route_to(controller: "work_packages",
action: "index",
diff --git a/spec/services/authorization/user_allowed_query_spec.rb b/spec/services/authorization/user_allowed_query_spec.rb
index 1dc0cdfb2b7..51abc567f2d 100644
--- a/spec/services/authorization/user_allowed_query_spec.rb
+++ b/spec/services/authorization/user_allowed_query_spec.rb
@@ -58,9 +58,9 @@ RSpec.describe Authorization::UserAllowedQuery do
expect(described_class.query(action, project)).to be_a ActiveRecord::Relation
end
- context 'w/o the project being public
- w/ the user being member in the project
- w/ the role having the necessary permission' do
+ context "without the project being public " \
+ "with the user being member in the project " \
+ "with the role having the necessary permission" do
before do
role.add_permission! action
role.save!
@@ -73,9 +73,9 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/o the project being public
- w/o the user being member in the project
- w/ the user being admin' do
+ context "without the project being public " \
+ "without the user being member in the project " \
+ "with the user being admin" do
before do
user.update_attribute(:admin, true)
end
@@ -85,9 +85,9 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/o the project being public
- w/ the user being member in the project
- w/o the role having the necessary permission' do
+ context "without the project being public " \
+ "with the user being member in the project " \
+ "without the role having the necessary permission" do
before do
role.save!
member.save!
@@ -98,9 +98,9 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/o the project being public
- w/o the user being member in the project
- w/ the role having the necessary permission' do
+ context "without the project being public " \
+ "without the user being member in the project " \
+ "with the role having the necessary permission" do
before do
role.add_permission! action
role.save!
@@ -111,10 +111,10 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/o the project being public
- w/o the user being member in the project
- w/ the user being member in a different project
- w/ the role having the permission' do
+ context "without the project being public " \
+ "without the user being member in the project " \
+ "with the user being member in a different project " \
+ "with the role having the permission" do
before do
role.add_permission! action
role.save!
@@ -128,10 +128,10 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/ the project being public
- w/o the user being member in the project
- w/ the user being member in a different project
- w/ the role having the permission' do
+ context "with the project being public " \
+ "without the user being member in the project " \
+ "with the user being member in a different project " \
+ "with the role having the permission" do
before do
role.add_permission! action
role.save!
@@ -148,9 +148,9 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/ the project being public
- w/o the user being member in the project
- w/ the non member role having the necessary permission' do
+ context "with the project being public " \
+ "without the user being member in the project " \
+ "with the non member role having the necessary permission" do
before do
project.public = true
@@ -166,9 +166,9 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/ the project being public
- w/o the user being member in the project
- w/ the anonymous role having the necessary permission' do
+ context "with the project being public " \
+ "without the user being member in the project " \
+ "with the anonymous role having the necessary permission" do
before do
project.public = true
@@ -184,9 +184,9 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/ the project being public
- w/o the user being member in the project
- w/ the non member role having another permission' do
+ context "with the project being public " \
+ "without the user being member in the project " \
+ "with the non member role having another permission" do
before do
project.public = true
@@ -202,9 +202,9 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/ the project being private
- w/o the user being member in the project
- w/ the non member role having the permission' do
+ context "with the project being private " \
+ "without the user being member in the project " \
+ "with the non member role having the permission" do
before do
non_member = ProjectRole.non_member
non_member.add_permission! action
@@ -218,10 +218,10 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/ the project being public
- w/ the user being member in the project
- w/o the role having the necessary permission
- w/ the non member role having the permission' do
+ context "with the project being public " \
+ "with the user being member in the project " \
+ "without the role having the necessary permission " \
+ "with the non member role having the permission" do
before do
project.public = true
project.save
@@ -239,10 +239,10 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/o the project being public
- w/ the user being member in the project
- w/o the role having the permission
- w/ the permission being public' do
+ context "without the project being public " \
+ "with the user being member in the project " \
+ "without the role having the permission " \
+ "with the permission being public" do
before do
member.save!
end
@@ -252,10 +252,10 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/ the project being public
- w/o the user being member in the project
- w/o the role having the permission
- w/ the permission being public' do
+ context "with the project being public " \
+ "without the user being member in the project " \
+ "without the role having the permission " \
+ "with the permission being public" do
before do
project.public = true
project.save
@@ -266,10 +266,10 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/ the user being member in the project
- w/ asking for a certain permission
- w/ the permission belonging to a module
- w/o the module being active' do
+ context "with the user being member in the project " \
+ "with asking for a certain permission " \
+ "with the permission belonging to a module " \
+ "without the module being active" do
let(:permission) do
OpenProject::AccessControl.permissions.find { |p| p.project_module.present? }
end
@@ -286,10 +286,10 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/ the user being member in the project
- w/ asking for a certain permission
- w/ the permission belonging to a module
- w/ the module being active' do
+ context "with the user being member in the project " \
+ "with asking for a certain permission " \
+ "with the permission belonging to a module " \
+ "with the module being active" do
let(:permission) do
OpenProject::AccessControl.permissions.find { |p| p.project_module.present? }
end
@@ -306,10 +306,10 @@ RSpec.describe Authorization::UserAllowedQuery do
end
end
- context 'w/ the user being member in the project
- w/ asking for a certain permission
- w/ the user having the permission in the project
- w/o the project being active' do
+ context "with the user being member in the project " \
+ "with asking for a certain permission " \
+ "with the user having the permission in the project " \
+ "without the project being active" do
before do
role.add_permission! action
member.save!
diff --git a/spec/services/work_packages/update_ancestors_service_spec.rb b/spec/services/work_packages/update_ancestors_service_spec.rb
index 3ea159cd7a6..72b23d7de4d 100644
--- a/spec/services/work_packages/update_ancestors_service_spec.rb
+++ b/spec/services/work_packages/update_ancestors_service_spec.rb
@@ -857,8 +857,8 @@ RSpec.describe WorkPackages::UpdateAncestorsService, type: :model do
.to contain_exactly(parent, grandparent, grandgrandparent)
end
- it 'sets the ignore_non_working_days property of the former ancestor chain to the value of the
- only remaining child (former sibling)' do
+ it "sets the ignore_non_working_days property of the former ancestor chain to the value of the " \
+ "only remaining child (former sibling)" do
subject
expect(parent.reload.ignore_non_working_days)
diff --git a/spec/support/shared/acts_as_attachable.rb b/spec/support/shared/acts_as_attachable.rb
index b5d75761ddb..64528402b2a 100644
--- a/spec/support/shared/acts_as_attachable.rb
+++ b/spec/support/shared/acts_as_attachable.rb
@@ -56,7 +56,7 @@ RSpec.shared_examples_for "acts_as_attachable included" do
end
end
- context "for attachments that are unattached, created by the current_user, " +
+ context "for attachments that are unattached, created by the current_user, " \
"added to attachments_claimed and the user having the permission" do
it "is valid" do
model_instance.attachments_claimed = [attachment1, attachment2]
@@ -66,7 +66,7 @@ RSpec.shared_examples_for "acts_as_attachable included" do
end
end
- context "for attachments that are unattached, created by the current_user, " +
+ context "for attachments that are unattached, created by the current_user, " \
"added to attachments_claimed and the user not having the permission" do
let(:current_user) { user_without_permission }
@@ -82,7 +82,7 @@ RSpec.shared_examples_for "acts_as_attachable included" do
end
end
- context "for attachments that are unattached, created by the current_user, " +
+ context "for attachments that are unattached, created by the current_user, " \
"added to attachments_claimed and the user not having the permission, but skipping permission checks" do
let(:current_user) { user_without_permission }
@@ -95,7 +95,7 @@ RSpec.shared_examples_for "acts_as_attachable included" do
end
end
- context "for attachments that are attached, created by the current_user, " +
+ context "for attachments that are attached, created by the current_user, " \
"added to attachments_claimed and the user having the permission" do
let(:attachment1) { create(:attachment, author: current_user) }
let(:attachment2) { create(:attachment, author: current_user) }
@@ -111,7 +111,7 @@ RSpec.shared_examples_for "acts_as_attachable included" do
end
end
- context "for attachments that are unattached, not created by the current_user, " +
+ context "for attachments that are unattached, not created by the current_user, " \
"added to attachments_claimed and the user having the permission" do
let(:attachment1) { create(:attachment, container: nil, author: other_user) }
let(:attachment2) { create(:attachment, container: nil, author: other_user) }
diff --git a/spec/workers/mails/member_created_job_spec.rb b/spec/workers/mails/member_created_job_spec.rb
index f230d5d3e08..d5c8c0456ce 100644
--- a/spec/workers/mails/member_created_job_spec.rb
+++ b/spec/workers/mails/member_created_job_spec.rb
@@ -71,8 +71,8 @@ RSpec.describe Mails::MemberCreatedJob, type: :model do
it_behaves_like "sends no mail"
end
- context 'with the user having had a membership with the same roles
- from another group before the group`s membership was added' do
+ context "with the user having had a membership with the same roles " \
+ "from another group before the group`s membership was added" do
let(:group_user_member_roles) do
[build_stubbed(:member_role,
role:,
@@ -82,7 +82,7 @@ RSpec.describe Mails::MemberCreatedJob, type: :model do
it_behaves_like "sends no mail"
end
- context "with the user having had a membership before the group`s membership " +
+ context "with the user having had a membership before the group`s membership " \
"was added but now has additional roles" do
let(:other_role) { build_stubbed(:project_role) }
let(:group_user_member_roles) do
@@ -145,8 +145,8 @@ RSpec.describe Mails::MemberCreatedJob, type: :model do
it_behaves_like "sends no mail"
end
- context 'with the user having had a membership with the same roles
- from another group before the group`s membership was added' do
+ context "with the user having had a membership with the same roles " \
+ "from another group before the group`s membership was added" do
let(:group_user_member_roles) do
[build_stubbed(:member_role,
role:,
diff --git a/spec/workers/mails/member_updated_job_spec.rb b/spec/workers/mails/member_updated_job_spec.rb
index 510e85047ec..f4ebc1196d6 100644
--- a/spec/workers/mails/member_updated_job_spec.rb
+++ b/spec/workers/mails/member_updated_job_spec.rb
@@ -75,8 +75,8 @@ RSpec.describe Mails::MemberUpdatedJob, type: :model do
it_behaves_like "updated mail"
end
- context 'with the user having had a membership with the same roles
- from another group before the group`s membership was added' do
+ context "with the user having had a membership with the same roles " \
+ "from another group before the group`s membership was added" do
let(:group_user_member_roles) do
[build_stubbed(:member_role,
role:,
@@ -144,8 +144,8 @@ RSpec.describe Mails::MemberUpdatedJob, type: :model do
it_behaves_like "sends no mail"
end
- context 'with the user having had a membership with the same roles
- from another group before the group`s membership was added' do
+ context "with the user having had a membership with the same roles " \
+ "from another group before the group`s membership was added" do
let(:group_user_member_roles) do
[build_stubbed(:member_role,
role:,