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

@@ -4,13 +4,13 @@ describe Shared::LinkListComponent do
it "renders nothing with an empty list" do
render_inline Shared::LinkListComponent.new
expect(page.native.inner_html).to be_empty
expect(page).not_to be_rendered
end
it "returns nothing with a list of nil elements" do
render_inline Shared::LinkListComponent.new(nil, nil)
expect(page.native.inner_html).to be_empty
expect(page).not_to be_rendered
end
it "generates a list of links" do