Define and apply matcher :be_rendered

Add this changes to make components specs clear
This commit is contained in:
taitus
2021-11-03 18:17:30 +01:00
parent 2b35144540
commit 612872ac7a
20 changed files with 41 additions and 28 deletions

View File

@@ -22,7 +22,7 @@ describe MachineLearning::CommentsSummaryComponent do
render_inline component
expect(page.native.inner_html).to be_empty
expect(page).not_to be_rendered
end
it "is not displayed when the machine learning feature is disabled" do
@@ -30,7 +30,7 @@ describe MachineLearning::CommentsSummaryComponent do
render_inline component
expect(page.native.inner_html).to be_empty
expect(page).not_to be_rendered
end
it "is not displayed when there's no summary" do
@@ -38,6 +38,6 @@ describe MachineLearning::CommentsSummaryComponent do
render_inline MachineLearning::CommentsSummaryComponent.new(commentable)
expect(page.native.inner_html).to be_empty
expect(page).not_to be_rendered
end
end