title: How to check a check box in Capybara test when using simple_form
body: <p>Trying to test some functionality in a simple page and I am getting this error when using page.check:</p>
  
  <pre><code>    Failures:
  
    1) searching for stores serving a taco and a sauce: Adobada tacos with Chile de Arbol sauce
       Failure/Error: page.check 'Adobada'
  
       Capybara::ElementNotFound:
         Unable to find checkbox "Adobada"
       # ./spec/views/store_search_spec.rb:8:in `block (2 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;%= simple_form_for :stores, url: stores_path, method: :get do |f| %&gt;
  
    &lt;%= f.label :tacos, 'Select Tacos to Find: ', class: 'label' %&gt;
    &lt;div class='taco-select checkboxes'&gt;
      &lt;%= f.collection_check_boxes :tacos, Taco.order(:name), :id, :name,
        :include_hidden =&gt; false, :item_wrapper_class =&gt; 'checkbox_container' %&gt;
    &lt;/div&gt;
  
    &lt;%= f.label :salsa, 'Select Sauces to Find: ', class: 'label' %&gt;
    &lt;div class='salsa-select checkboxes'&gt;
      &lt;%= f.collection_check_boxes :salsas, Salsa.order(:name), :id, :name,
        :include_hidden =&gt; false, :item_wrapper_class =&gt; 'checkbox_container' %&gt;
    &lt;/div&gt;
  
    &lt;%= f.submit 'Search!' %&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>And this is my test:</p>
  
  <pre><code>require 'rails_helper'
  
  feature 'searching for stores', %(serving a taco and a sauce:) do
  
    scenario 'Adobada tacos with Chile de Arbol sauce' do
      visit root_path
  
      page.check 'Adobada'
      page.check 'Chile de Arbol'
  
      click_button 'Search!'
  
      expect(page).to have_content "Store"
      expect(page).to have_content 'City'
  
    end
  end
  </code></pre>
  
  <p>I would like to test that when some checkboxes are set to true a certain content is rendered in the page.
  Don't know how to fix this.</p>