               type: 'text'
             template: jasmineRequireTemplate
             templateOptions:
-              requireConfigFile: 'src/test/js/js-test-require-config.js'
+              requireConfigFile: testRequireConfig
               requireConfig:
                 config:
                   instrumented: {
-                    src: grunt.file.expand('src/main/exports/javascript-utils/js/**/*.js')
+                    src: grunt.file.expand(sourcePath)
                   }
                 callback: () ->
                   define('instrumented', ['module'], (module) ->

  jasmineSpecRunner = 'spec-runner.html'
  coverageSpecRunner = 'coverage-runner.html'

  grunt.initConfig
    pkg: grunt.file.readJSON 'package.json'
    build:
      src: 'src'
      dest: 'build'
    clean: [
      jasmineSpecRunner
      coverageSpecRunner
      'bin'
      'build'
      '.grunt'
    ]
    connect:
      test:
        options:
          port: 8000
      coverage:
        options:
          port: 8000
    jasmine:
      test:
        src: 'src/main/exports/javascript-utils/js/**/*.js'
        options:
          host: 'http://localhost:8000/'
          keepRunner: true
          outfile: jasmineSpecRunner
          specs: 'src/test/js/spec/**/*.js'
          styles: 'src/test/css/bootstrap-stub.css'
          template: jasmineRequireTemplate
          templateOptions:
            requireConfigFile: 'src/test/js/js-test-require-config.js'
      coverage:
        src: 'src/main/exports/javascript-utils/js/**/*.js'
        options:
          host: 'http://localhost:8000/'
          keepRunner: true
          outfile: coverageSpecRunner
          specs: 'src/test/js/spec/**/*.js'
          styles: 'src/test/css/bootstrap-stub.css'
          template: jasmineIstanbulTemplate
          templateOptions:
            coverage: 'bin/coverage/coverage.json'

  grunt.loadNpmTasks 'grunt-coffeelint'

  grunt.registerTask 'default', 'test'
  grunt.registerTask 'test', ['connect:server', 'jasmine:test']
  grunt.registerTask 'coverage', ['connect:server', 'jasmine:coverage']
  grunt.registerTask 'lint', ['jshint', 'coffeelint']
