Skip to content

Commit

Permalink
Added a spec for stabby lambda operator
Browse files Browse the repository at this point in the history
  • Loading branch information
mamenama committed Nov 6, 2015
1 parent 339e97e commit 7ef1fdf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/ruby-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -593,3 +593,7 @@ describe "Ruby grammar", ->
expect(tokens[12]).toEqual value: 'green', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'constant.other.symbol.hashkey.parameter.function.ruby']
expect(tokens[15]).toEqual value: 'rand', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'support.function.kernel.ruby']
expect(tokens[17]).toEqual value: '3', scopes: ['source.ruby', 'meta.function.method.with-arguments.ruby', 'constant.numeric.ruby']

it "tokenizes a stabby lambda properly", ->
{tokens} = grammar.tokenizeLine('method_name -> { puts "A message"} do')
expect(tokens[1]).toEqual value: '->', scopes: [ 'source.ruby', 'keyword.operator.lambda.ruby' ]

0 comments on commit 7ef1fdf

Please sign in to comment.