Skip to content

Instantly share code, notes, and snippets.

@will
Created January 16, 2010 17:44
Show Gist options
  • Select an option

  • Save will/278914 to your computer and use it in GitHub Desktop.

Select an option

Save will/278914 to your computer and use it in GitHub Desktop.
# 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