Skip to content

Commit 8674060

Browse files
committed
Workaround for arity mismatch on Groovy. Need an explicitly empty list of closure parameters. Closes #297.
1 parent a6c1e2d commit 8674060

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

src/test/groovy/cucumber/runtime/groovy/compiled_stepdefs.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Given(~'^I have (\\d+) apples in my belly') { int apples ->
1313
lastAte('apples')
1414
}
1515

16-
Given(~'^a big basket with cukes') {->
16+
Given(~'^a big basket with cukes') { ->
1717
}
1818

1919
Given(~'^the following table:$') { table ->

src/test/java/cucumber/runtime/groovy/RunCukesTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
import org.junit.runner.RunWith;
55

66
@RunWith(Cucumber.class)
7+
@Cucumber.Options(tags="@focus")
78
public class RunCukesTest {
89
}

src/test/resources/cucumber/runtime/groovy/a_feature.feature

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Feature: Cucumber Runner Rocks
1616
| 13 | cukes | happy |
1717
| 4 | apples | tired |
1818

19-
@focus
2019
Scenario: a table
2120
Given the following table:
2221
| year | name |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@focus
2+
Feature: Issue 297
3+
Scenario: Carbon Coder executes unsuccessfully
4+
Given Carbon Coder is running correctly
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package cucumber.runtime.groovy
2+
this.metaClass.mixin(cucumber.runtime.groovy.EN)
3+
4+
// Step definitions without parameters must explicitly define an empty list of parameters.
5+
Given(~"Carbon Coder is running correctly\$") { ->
6+
}

0 commit comments

Comments
 (0)