fix regex
This commit is contained in:
parent
77d5a527f8
commit
58d5646128
10
README.md
10
README.md
@ -33,19 +33,19 @@ Feature 'Complex Backbone View', ->
|
|||||||
Run it and you'll be told you need to define some steps, Cucumber-style:
|
Run it and you'll be told you need to define some steps, Cucumber-style:
|
||||||
|
|
||||||
``` coffeescript
|
``` coffeescript
|
||||||
When /I render the view/, ->
|
When /^I render the view$/, ->
|
||||||
@result = @view.render()
|
@result = @view.render()
|
||||||
|
|
||||||
Then /the view should return itself/, ->
|
Then /^the view should return itself$/, ->
|
||||||
expect(@result).toEqual(@view)
|
expect(@result).toEqual(@view)
|
||||||
|
|
||||||
Then /the view should contain "([^"]+)"/, (selector) ->
|
Then /^the view should contain "([^"]+)"$/, (selector) ->
|
||||||
expect($(@view.el)).toContain(selector)
|
expect($(@view.el)).toContain(selector)
|
||||||
|
|
||||||
Given /the model has the name "([^"]+)"/, (name) ->
|
Given /^the model has the name "([^"]+)"$/, (name) ->
|
||||||
@model.set(name: name)
|
@model.set(name: name)
|
||||||
|
|
||||||
Then /the view has the "([^"]+)" with the text "([^"]+)"/, (selector, text) ->
|
Then /^the view has the "([^"]+)" with the text "([^"]+)"$/, (selector, text) ->
|
||||||
expect(view.$(selector)).toHaveText(text)
|
expect(view.$(selector)).toHaveText(text)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -113,11 +113,11 @@ class jasmine.GWT.Scenario extends jasmine.GWT.Background
|
|||||||
'"([^"]+)"'
|
'"([^"]+)"'
|
||||||
|
|
||||||
if argCount == 0
|
if argCount == 0
|
||||||
output.push("#{type} /#{name}/, ->")
|
output.push("#{type} /^#{name}$/, ->")
|
||||||
else
|
else
|
||||||
args = ("arg#{i}" for i in [ 1..(argCount) ])
|
args = ("arg#{i}" for i in [ 1..(argCount) ])
|
||||||
|
|
||||||
output.push("#{type} /#{name}/, (#{args.join(', ')}) ->")
|
output.push("#{type} /^#{name}$/, (#{args.join(', ')}) ->")
|
||||||
|
|
||||||
output.push(" @not_defined()")
|
output.push(" @not_defined()")
|
||||||
output.push("")
|
output.push("")
|
||||||
|
Loading…
Reference in New Issue
Block a user