-
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: issue#25 recursive glob pattern for features directory
- Loading branch information
0xste_bd
committed
Nov 27, 2023
1 parent
d39ed9c
commit f2e583c
Showing
7 changed files
with
55 additions
and
3 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
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