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

chore[#48620] remove unecessary constructor

Kabiru Mwenjaa1bc98241482
diff --git a/spec/components/attribute_groups/attribute_group_component_spec.rb b/spec/components/attribute_groups/attribute_group_component_spec.rb
index ddfcb34f5ad..83f5aadd8a8 100644
--- a/spec/components/attribute_groups/attribute_group_component_spec.rb
+++ b/spec/components/attribute_groups/attribute_group_component_spec.rb
@@ -31,7 +31,7 @@
require "rails_helper"
RSpec.describe AttributeGroups::AttributeGroupComponent, type: :component do
- subject(:component_render) do
+ it 'renders the title' do
render_inline(described_class.new) do |component|
component.with_group_header(title: "A Title")
@@ -40,11 +40,7 @@ RSpec.describe AttributeGroups::AttributeGroupComponent, type: :component do
{ key: "Attribute Key 2", value: "Attribute Value 2" }]
)
end
- end
- before { component_render }
-
- it 'renders the title' do
aggregate_failures 'group header' do
expect(page).to have_css('.attributes-group')
expect(page).to have_css('h3.attributes-group--header-text', text: 'A Title')
diff --git a/spec/components/attribute_groups/attribute_group_header_component_spec.rb b/spec/components/attribute_groups/attribute_group_header_component_spec.rb
index 7e5f90b0f88..904a579ce3e 100644
--- a/spec/components/attribute_groups/attribute_group_header_component_spec.rb
+++ b/spec/components/attribute_groups/attribute_group_header_component_spec.rb
@@ -31,13 +31,9 @@
require "rails_helper"
RSpec.describe AttributeGroups::AttributeGroupHeaderComponent, type: :component do
- subject(:component_render) do
+ it 'renders the title' do
render_inline(described_class.new(title: 'A Title'))
- end
- before { component_render }
-
- it 'renders the title' do
expect(page).to have_css('h3.attributes-group--header-text', text: 'A Title')
end
end
diff --git a/spec/components/attribute_groups/attribute_key_value_component_spec.rb b/spec/components/attribute_groups/attribute_key_value_component_spec.rb
index fc72510a72c..ef630bebccf 100644
--- a/spec/components/attribute_groups/attribute_key_value_component_spec.rb
+++ b/spec/components/attribute_groups/attribute_key_value_component_spec.rb
@@ -31,13 +31,9 @@
require "rails_helper"
RSpec.describe AttributeGroups::AttributeKeyValueComponent, type: :component do
- subject(:component_render) do
+ it 'renders the attribute key and value' do
render_inline(described_class.new(key: 'Attribute Key', value: 'Attribute Value'))
- end
- before { component_render }
-
- it 'renders the attribute key and value' do
expect(page).to have_css('.attributes-key-value--key', text: 'Attribute Key') &
have_css('.attributes-key-value--value.-text', text: 'Attribute Value')
end