Sorry Navi, I'm not too familiar with the inner workings of Cucumber. I 
abandoned it long ago for RSpec. While people on this mailing list can 
likely help with how to use Cucumber, understanding the internal workings 
is likely better suited in Cucumber's mailing list (or whatever they use).

For what I can see, if you want to understand how the Around works, you can 
start following the code from 
https://github.com/cucumber/cucumber-ruby/blob/558a89faf615c2e9be674b17061934243cd19d50/lib/cucumber/glue/dsl.rb#L75-L82.

I haven't heard of people complaining about hook orders fluctuating. It 
would seem pretty useless if their order wasn't consistent. Do you have 
specific article that says that? 

Justin


On Wednesday, April 3, 2019 at 7:39:35 PM UTC-4, NaviHan wrote:
>
> Hi Titus/Justin
>
> If you could help me here understanding this...
>
> Also what is the order in which the before, after and around hooks run.
>
> I tried printing the order and as per my experimenatation the order is
>
> 1. Around
> 2. Before &
> 3. After
>
> Some of the articles I read says this order is fluctuating.. Is this true?
>
> On Friday, 29 March 2019 16:33:14 UTC+11, NaviHan wrote:
>>
>> Im trying to understand how the around hooks work
>>
>> Im sorry if the question is very basic. I cant find the implementation of 
>> "Around" in Cucumber API docs as well (checked  
>>
>> *Cucumber::RbSupport::RbDsl*
>> in
>>
>> *Around **do *|*scenario*, *block*|
>>
>>   puts *"About to run *#{*scenario*.name}
>>
>> *"  **block*.call
>>
>>   puts *"Finished running *#{*scenario*.name}
>>
>> *"**end*
>>
>>
>> I was expecting scenario.call instead of block.call
>>
>> How does the scenario gets passed to block?
>>
>

-- 
-- 
Before posting, please read 
https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
 
In short: search before you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]
--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to