-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: recursive glob pattern for features directory (#26)
Closes #25 --------- Co-authored-by: 0xste_bd <[email protected]>
- Loading branch information
Showing
8 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: one | ||
|
||
Scenario: eat cukes | ||
Given I have 10 cukes | ||
When I eat 1 | ||
Then I have 9 left |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: two | ||
|
||
Scenario: eat cukes | ||
Given I have 10 cukes | ||
When I eat 2 | ||
Then I have 8 left |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Feature: zero | ||
|
||
Scenario: eat cukes | ||
Given I have 10 cukes | ||
When I eat 0 | ||
Then I have 10 left |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package main | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/regen-network/gocuke" | ||
) | ||
|
||
// should recursively load scenarios from features directory | ||
func TestSimple(t *testing.T) { | ||
gocuke.NewRunner(t, &simpleSuite{}).Run() | ||
} | ||
|
||
type simpleSuite struct { | ||
gocuke.TestingT | ||
cukes int64 | ||
} | ||
|
||
func (s *simpleSuite) IHaveCukes(a int64) { | ||
s.cukes = a | ||
} | ||
|
||
func (s *simpleSuite) IEat(a int64) { | ||
s.cukes -= a | ||
} | ||
|
||
func (s *simpleSuite) IHaveLeft(a int64) { | ||
if a != s.cukes { | ||
s.Fatalf("expected %d cukes, have %d", a, s.cukes) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters