Skip to content

Commit

Permalink
Workaround for arity mismatch on Groovy. Need an explicitly empty lis…
Browse files Browse the repository at this point in the history
…t of closure parameters. Closes #297.
  • Loading branch information
aslakhellesoy committed Apr 12, 2012
1 parent a6c1e2d commit 8674060
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Given(~'^I have (\\d+) apples in my belly') { int apples ->
lastAte('apples')
}

Given(~'^a big basket with cukes') {->
Given(~'^a big basket with cukes') { ->
}

Given(~'^the following table:$') { table ->
Expand Down
1 change: 1 addition & 0 deletions src/test/java/cucumber/runtime/groovy/RunCukesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@Cucumber.Options(tags="@focus")
public class RunCukesTest {
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Feature: Cucumber Runner Rocks
| 13 | cukes | happy |
| 4 | apples | tired |

@focus
Scenario: a table
Given the following table:
| year | name |
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/cucumber/runtime/groovy/issue_297.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@focus
Feature: Issue 297
Scenario: Carbon Coder executes unsuccessfully
Given Carbon Coder is running correctly
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package cucumber.runtime.groovy
this.metaClass.mixin(cucumber.runtime.groovy.EN)

// Step definitions without parameters must explicitly define an empty list of parameters.
Given(~"Carbon Coder is running correctly\$") { ->
}

0 comments on commit 8674060

Please sign in to comment.