title: Set capybara default_wait_time to a function
body: <p>I made a function called wait_for_page load, and I am trying to set the default_wait_time to this function. </p>
  
  <p>I get an undefined variable error:</p>
  
  <blockquote>
    <p>undefined local variable or method `page' for main:Object (NameError)</p>
  </blockquote>
  
  <p>I also included the file into the main environment file:</p>
  
  <blockquote>
    <p>require File.expand_path('../../support/file_name.rb', <strong>FILE</strong>)</p>
  </blockquote>