Using minitest’s integration
test to test multiple classes like the following:
<div class="notification is-danger">
<p>test</p>
</div>
At first, I wrote it like this, but the test didn’t pass:
test "testing multiple classes" do
assert_select 'div.notification is-danger'
end
The correct approach is to use a do
block:
test "testing multiple classes" do
assert_select 'div.notification' do
assert_select 'div.is-danger'
end
end