I was wondering about something, cucumber returns an exit code 0 (which means "ok" as far as i know) when a Background fails.
Now failing steps shouldn't probably be in the Background (at best in a 'before'-hook i guess??). But does anybody know with what philosophy it returns this exit code? Is it a bug or a feature?
Appendix: A more concrete example: Lets say this code passes:
Feature: Figuring out how Cucumber works
As a developer
I want to find out why cuccies fail, but my build doesnt
In order to have more confidence in my build
Background: logging in into the system
Given I am logged in
Scenario: creating a new test set
When I do something
Then I should see "you've done something"
It returns with exit code 0. Lets make it fail:
Background: logging in into the system
Given I am logged in
Scenario: creating a new test set
Then I should see "there's no way you see this"
When I do something
Then I should see "you've done something"
The output shows a failing step and it returns with exit code 1 When I move the failing step to the Background:
Background: logging in into the system
Given I am logged in
Then I should see "there's no way you see this"
Scenario: creating a new test set
When I do something
Then I should see "you've done something"
The output still shows it failed, but it returns with exit code 0