There may come situation when you try to check(tick) the checkboxes via RSpec. using codes like
We have hidden the original checkbox and the fancy checkbox was being shown. Since the item was hidden Capybara was not able to find the element.
Instead of searching for hidden item, I triggered the click event on the Label for that Checkbox
within('.term-condition') do find('[for=agree_legal_guardian]').click find('[for=agree_terms]').click end