title: Geb & Spock: Close Browser Between Each Test
body: <p>I need to close my browser between each test.  Geb creates the browser for me, so I am under the impression that Geb should shut down the driver between each test.  However it doesn't.  Here's a structure and part of the GebConfig.groovy.</p>
  
  <pre><code>test_automation
  -functional
  --src
  ---test
  ---groovy
  ----spec
  -----Test Locations
  ---resources
  ----GebConfig.groovy
  </code></pre>
  
  <p>GebConfig.groovy</p>
  
  <pre><code>waiting {
      timeout = 20
  }
  
  environments {
      chrome {
          driver = {
              System.setProperty('webdriver.chrome.driver', 'src/test/resources/chromedriver')
              new ChromeDriver()
          }
      }
  
      firefox {
          driver = { new FirefoxDriver() }
      }
  }
  </code></pre>
  
  <p>I've extended GebSpec to CommonGebSpec and here are multiple things I've tried:</p>
  
  <p>CommonGebSpec.groovy</p>
  
  <pre><code>def setup() {
      resetBrowser()
      getBrowser()
  }
  
  def cleanup() {
      browser.close()
      browser.quit()
  }
  ______________________________
  
  def cleanup() {
      browser.clearCookies()
  }
  ______________________________
  
  def cleanup() {
      resetBrowser()
  }
  </code></pre>
  
  <p>I've tried those specifically and may variations thereof.  Anyone know why my browser won't close between tests?</p>
  
  <p>Thanks.</p>