title: Grails: Inject FixtureLoader into Specification
body: <p>Does anyone know how to inject the grails FixtureLoader into a test?  I've tried everything, but to no avail. The first thing I've tried was doing this in my tests.</p>
  
  <pre><code>def fixtureLoader 
  </code></pre>
  
  <p>or
     FixtureLoader fixtureLoader</p>
  
  <p>Intellij shows that it is "spring injected" with the little leaf, but no luck.  Then I tried adding this to my spring/resources./groovy file.</p>
  
  <pre><code>beans = {
      fixtureLoader(FixtureLoader)
  }
  </code></pre>
  
  <p>Wrong again.</p>
  
  <p>The closest I have gotten to was adding this to my tests so that it looks like this.</p>
  
  <pre><code>@TestMixin(FixtureLoader)
  class SomeControllerIntegrationSpec extends Specification {
  </code></pre>
  
  <p>but that didn't work either.  However, when debugging, I saw a $fixtureLoader variable that was initialized.  One of the side problems I noticed when debugging was that the FixtureLoader class requires a "grailsApplication" while being initialized.  What was passed to it during the test was null.</p>
  
  <p>Any help on this injecting conundrum is greatly appreciated.</p>