Skip to content

Commit

Permalink
made .parse() use correct context
Browse files Browse the repository at this point in the history
  • Loading branch information
zspecza committed Apr 18, 2014
1 parent 85dfafb commit 276ac42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/parser.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Parser
* @param {[Parser~parseCallback]} callback - handles the file
* @return {Object} - the config object representing the config file
###
parse: (file, callback) ->
parse: (file, callback) =>
handler = get_handler.call(@, file)
if callback?
nodefn.call fs.readFile, file, encoding: 'utf8'
Expand Down
2 changes: 1 addition & 1 deletion test/test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ afterEach -> fs.writeFileSync configFile, makeJSON 'bar'

describe 'async', ->

beforeEach -> @config = nodefn.call(figson.parse.bind(figson), configFile)
beforeEach -> @config = nodefn.call(figson.parse, configFile)

it 'should expose the data object', (done) ->
@config.then expose_data
Expand Down

0 comments on commit 276ac42

Please sign in to comment.