you can use assert_in here, per my previous comment of checking whether the expected text is contained within the block, rather than equal to.