Created
January 16, 2010 17:44
-
-
Save will/278914 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # randomly failing | |
| # so this hack retries features | |
| # i'm so, so sorry | |
| class CucumberFeature | |
| def initialize(path) | |
| @path = path | |
| @result = run | |
| end | |
| def green? | |
| @result | |
| end | |
| def run | |
| try || try_again | |
| end | |
| private | |
| def try | |
| system "#{root_dir}/bin/cucumber #{@path}" | |
| end | |
| def try_again | |
| puts "**** RESTARTING FEATURE: #{@path}" | |
| try | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment