We need to format the name slightly differently for Jenkins integration
purposes, there's no good tests here because I'm lazy and had a reproduction
case in the Lookout code base. I will regret this.
This required some minor changes in Sauce::Job which should not impact anything
else, as far as I can tell.
This also lacks decent tests, partially because I'm lazy, and partially because I used
the Lookout code-base as a guinea pig (since we already have this functionality there)
Fixes#69
In theory this should help with #67, but it's terribly painful to unit test
and I'm not sure I'll really know if this is working until I put it into production :-/
This took a while, is ugly as sin, and will cause your nose to bleed if you
look at it too long.
The basic gist of how/why we have to do these things is:
* Cucumber::AST::Scenario, Step and StepCollection don't like to be run
multiple times. In order to acheive a "sane" retry we need to
re-initialize the Scenario on each retry in order to instantiate new
underlying Step/StepCollection/StepInvocation objects
* Exceptions are actually swallowed up by the Cucumber::AST::Scenario in
order to be reported properly later, so we must fish the exception out of
the Scenario in order to tell if we need to retry
* Selenium::WebDriver aliases UnhandledError to UnknownError, which fubars
any ability to run `e.is_a? Selenium::WebDriver::Errors::UnhandledError`.
That said, I think we might find other retryable errors in the future so
this forced the approach used to be extendable.
I know more than I ever wanted to know about Cucumber::Ast thanks to this bug
Fixes#62
In order to test these things effectively, we need to pull in some magic code
straight from the cucumber code-base itself.
As far as I can tell, this is the only "reasonable" way to test hooks or things
of that ilk because of the tendency for "cucumber magic" to happen inside of a
weird global 'World' scope
I could just be misunderstanding all of this though.
Tired of seeing these errors in these test cases.
DEPRECATION WARNING: you are using a deprecated constant that will
be removed from a future version of RSpec.
/home/tyler/.rvm/gems/ree-1.8.7-2011.12@sauce_ruby/gems/rspec-core-2.9.0/lib/rspec/core/hooks.rb:24:in `call'
* Rspec is deprecated.
* RSpec is the new top-level module in RSpec-2
Unfortunately this doesn't come with any tests, I will have to ponder on a good
mechanism for testing cucumber hooks at a later date, when I'm smarter.