Skip to content

Commit

Permalink
Fix tests on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
lsegal committed May 14, 2015
1 parent 661ed23 commit d1960f0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions gherkin/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ Feature: Refund item
assert.Equal(t, 4, len(features[0].Scenarios[0].Steps))
assert.Equal(t, "@tag1", features[0].Scenarios[0].Tags[0])
assert.Equal(t, "@tag2", features[0].Scenarios[0].Tags[1])
assert.Equal(t, "Given", features[0].Scenarios[0].Steps[0].Type)
assert.Equal(t, StepType("Given"), features[0].Scenarios[0].Steps[0].Type)
assert.Equal(t, "Jeff has bought a microwave for $100", features[0].Scenarios[0].Steps[0].Text)
assert.Equal(t, "And", features[0].Scenarios[0].Steps[1].Type)
assert.Equal(t, StepType("And"), features[0].Scenarios[0].Steps[1].Type)
assert.Equal(t, "he has a receipt", features[0].Scenarios[0].Steps[1].Text)
assert.Equal(t, "When", features[0].Scenarios[0].Steps[2].Type)
assert.Equal(t, StepType("When"), features[0].Scenarios[0].Steps[2].Type)
assert.Equal(t, "he returns the microwave", features[0].Scenarios[0].Steps[2].Text)
assert.Equal(t, "Then", features[0].Scenarios[0].Steps[3].Type)
assert.Equal(t, StepType("Then"), features[0].Scenarios[0].Steps[3].Type)
assert.Equal(t, "Jeff should be refunded $100", features[0].Scenarios[0].Steps[3].Text)
}

Expand Down Expand Up @@ -164,7 +164,7 @@ Feature: Scenario outlines
f, err := Parse(s)
assert.NoError(t, err)
assert.Equal(t, 2, len(f[0].Scenarios))
assert.Equal(t, "| foo | bar |\n| 1 | 2 |\n| 3 | 4 |", f[0].Scenarios[0].Examples)
assert.Equal(t, StringData("| foo | bar |\n| 1 | 2 |\n| 3 | 4 |"), f[0].Scenarios[0].Examples)
}

func TestStepArguments(t *testing.T) {
Expand All @@ -189,9 +189,9 @@ Feature: Step arguments
f, err := Parse(s)
assert.NoError(t, err)
assert.Equal(t, 2, len(f[0].Scenarios))
assert.Equal(t, "| 1 | 2 |\n| 3 | 4 |", f[0].Scenarios[0].Steps[0].Argument)
assert.Equal(t, " hello\n world", f[0].Scenarios[0].Steps[1].Argument)
assert.Equal(t, "| 1 | 2 |", f[0].Scenarios[0].Steps[2].Argument)
assert.Equal(t, StringData("| 1 | 2 |\n| 3 | 4 |"), f[0].Scenarios[0].Steps[0].Argument)
assert.Equal(t, StringData(" hello\n world"), f[0].Scenarios[0].Steps[1].Argument)
assert.Equal(t, StringData("| 1 | 2 |"), f[0].Scenarios[0].Steps[2].Argument)
assert.Equal(t, "other text", f[0].Scenarios[0].Steps[3].Text)
}

Expand Down

0 comments on commit d1960f0

Please sign in to comment.