       testPage:
         replacements: [{
           from: '__helperFiles__'
-          to: _.map(grunt.file.expand(["test/javascripts/helpers/**/*.js"]), (file) ->
-            "<script src=\"#{file}\"></script>"
-          ).join('\n  ')
+          to: ->
+            _.map(grunt.file.expand(["test/javascripts/helpers/**/*.js"]), (file) ->
+              "<script src=\"#{file}\"></script>"
+            ).join('\n  ')
         }, {
           from: '__specFiles__'
-          to: _.map(specFiles, (file) ->
-            "<script src=\"#{file}\"></script>"
-          ).join('\n  ')
+          to: ->
+            _.map(specFiles(), (file) ->
+              "<script src=\"#{file}\"></script>"
+            ).join('\n  ')
         }]
         src: ['test/testpage.tpl']
         dest: 'test/testpage.html'

  version = grunt.option('version') || '0.1.0'

  srcFiles = "src/**/*.js"
  specFiles = grunt.file.expand ['test/**/*Spec.js']

  buildDir = "builds"



    "regex-check":
      consolelogs:
        src: [srcFiles, specFiles()]
        options:
          pattern: /console\.log/g

