Refactored test to use be_within syntax