You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Watir General
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
Arounddo|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?
NaviHan
unread,
Apr 3, 2019, 7:39:35 PM4/3/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Watir General
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?
Justin Ko
unread,
Apr 4, 2019, 11:09:53 AM4/4/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Watir General
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).
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
NaviHan
unread,
Apr 4, 2019, 6:51:03 PM4/4/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Watir General
Thanks Justin
I have posted the query in Cukes mailing list.
Cheers
Navi
On Friday, 29 March 2019 16:33:14 UTC+11, NaviHan wrote: