           require: 'coffee-script/register'
           reporter: 'spec'
         src: [
-          'src/test/**/*.coffee'
+          'test/**/*.coffee'
+        ]
+
+    copy:
+      dist:
+        files: [
+          expand: true,
+          cwd: 'test',
+          dest: 'dist/test/',
+          src: [
+            '**/*.json'
+          ]
         ]
 
     watch:


    clean: ['dist/']

  grunt.event.on 'watch', (action, files, target)->
    grunt.log.writeln "#{target}: #{files} has #{action}"

    # coffeelint
    grunt.config ['coffeelint', target], src: files

    # coffee
    coffeeData = grunt.config ['coffee', target]
    files = [files] if _.isString files
    files = files.map (file)-> path.relative coffeeData.cwd, file
    coffeeData.src = files

    grunt.config ['coffee', target], coffeeData

  # tasks.
  grunt.registerTask 'compile', [
    'coffeelint'
    'coffee'
  ]

  grunt.registerTask 'test', [

    coffee:
      lib:
        expand: true
        cwd: 'lib/'
        src: ['**/*.coffee']
        dest: 'dist/lib'
        ext: '.js'
      test:
        expand: true
        cwd: 'test/'
        src: ['**/*.coffee']
        dest: 'dist/test/'
        ext: '.js'
