fix regex

This commit is contained in:
John Bintz 2012-01-12 09:44:37 -05:00
parent 77d5a527f8
commit 58d5646128
2 changed files with 7 additions and 7 deletions

View File

@ -33,19 +33,19 @@ Feature 'Complex Backbone View', ->
Run it and you'll be told you need to define some steps, Cucumber-style:
``` coffeescript
When /I render the view/, ->
When /^I render the view$/, ->
@result = @view.render()
Then /the view should return itself/, ->
Then /^the view should return itself$/, ->
expect(@result).toEqual(@view)
Then /the view should contain "([^"]+)"/, (selector) ->
Then /^the view should contain "([^"]+)"$/, (selector) ->
expect($(@view.el)).toContain(selector)
Given /the model has the name "([^"]+)"/, (name) ->
Given /^the model has the 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)
```

View File

@ -113,11 +113,11 @@ class jasmine.GWT.Scenario extends jasmine.GWT.Background
'"([^"]+)"'
if argCount == 0
output.push("#{type} /#{name}/, ->")
output.push("#{type} /^#{name}$/, ->")
else
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("")