Permalink
Browse files

Fix RAML filename in template

Patch code to correctly pass RAML filename to template.
  • Loading branch information...
1 parent b4fc99f commit 7d651ae5e84972a39722927ce20dfa90cc9d9cff @plroebuck plroebuck committed Apr 4, 2016
Showing with 5 additions and 5 deletions.
  1. +1 −1 lib/abao.coffee
  2. +1 −1 lib/options.coffee
  3. +1 −1 lib/test-runner.coffee
  4. +2 −2 templates/hookfile.js
View
@@ -46,7 +46,7 @@ class Abao
,
# Run tests
(callback) ->
- runner = new Runner config.options
+ runner = new Runner config.options, config.ramlPath
runner.run tests, hooks, callback
], done
View
@@ -46,7 +46,7 @@ options =
default: 2000
template:
- description: 'Specify the template file to use for generating hooks'
+ description: 'Specify template file to use for generating hooks'
type: 'string'
normalize: true
@@ -56,6 +56,7 @@ class TestRunner
options = @options
addTestToMocha = @addTestToMocha
mocha = @mocha
+ ramlFile = path.basename @ramlFile
names = []
async.waterfall [
@@ -80,7 +81,6 @@ class TestRunner
(callback) ->
if options['generate-hooks']
# Generate hooks skeleton file
- ramlFile = path.basename @ramlFile
templateFile = if options.template
options.template
else
@@ -1,8 +1,8 @@
//
// ABAO hooks file {{! Mustache template }}
// Generated from RAML specification
-// RAML: "{{ramlFile}}"
-// Date: "{{timestamp}}"
+// RAML: {{ramlFile}}
+// Date: {{timestamp}}
// <https://github.com/cybertk/abao>
//

0 comments on commit 7d651ae

Please sign in to comment.