<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">I've had very similar
conversations with quite a lot of Ruby developers on this topic. I agree
with the sentiment that cucumber can work well, and I'd advocate the
approaches suggested.<br>
<br>
But the majority of Ruby developers, I've either interviewed or worked
with, much prefer RSpec. Of all the arguments against I've heard, these
are the typical ones (some of these already mentioned on this thread):<br>
<br>
1). cucumber is slow<br>
<br>
99% of the time what they are referring to turns out to be the
implementation of tests being slow not the framework itself<br>
<br>
2). cucumber is bloated<br>
<br>
probably a fair criticism. RSpec isn't compact either but there has been
acknowledgement of this problem from cucumber contributors
(<a class="moz-txt-link-freetext" href="http://blog.mattwynne.net/2012/04/26/a-vision-for-cucumber-2-0/">http://blog.mattwynne.net/2012/04/26/a-vision-for-cucumber-2-0/</a> and
<a class="moz-txt-link-freetext" href="https://groups.google.com/forum/#!msg/cukes/a6KmuoWiCJE/M_s7uIgNDW0J">https://groups.google.com/forum/#!msg/cukes/a6KmuoWiCJE/M_s7uIgNDW0J</a>).
It seems like something that is there to be addressed though & on
the roadmap, although it will take some time.<br>
<br>
3). product owners never end up reading or contributing to cucumber
tests, so why bother with gherkin<br>
<br>
even if this is the case, there's value in clearly specifying the key
features of any application using domain language. This way any new
developer or other team member can grasp this without knowing the code.
>From my experience, it is possible to get product owners contributing,
even it takes a bit of work to make it easy for them. With initiatives
like <a class="moz-txt-link-freetext" href="https://cucumber.pro/">https://cucumber.pro/</a> and <a class="moz-txt-link-freetext" href="https://www.relishapp.com/">https://www.relishapp.com/</a>, who knows it
might get easier.<br>
<br>
The patterns for RSpec discussed improve readability, and are something
I'd go for if working on feature/request specs, but (in my opinion) it's
still not quite up there with a plain text scenario. You can also use a
DSL provided by libraries like turnip, which gives you the opportunity
to use a gherkin syntax in RSpec though.<br>
<br>
4). why have two test frameworks?<br>
<br>
if you keep your test logic in pure ruby code like people have
mentioned, you can: <br>
- share helpers across RSpec and cucumber relatively easily (if you want
to); <br>
- establish some common standards and patterns; <br>
- have test code that any ruby developer can read, in both suites. <br>
<br>
It can be useful to separate acceptance/end-to-end tests and lower-level
unit & component tests e.g. if the acceptance tests need different
setup such as background workers running, search indexes populated, etc.
Doing this for all tests might be unnecessarily slow your lower-level
test down if those are all you need to run. Depends on the codebase
& the team, I guess.<br>
<br>
You can use RSpec metadata and request types to separate these concerns
too; it's a bit more fiddly.<br>
<br>
5). regexes and step definitions are much less readable than method
calls with parameters<br>
<br>
something picked up on already, and something I can understand. But as
people have pointed out, there are patterns you can apply that make this
less of an issue. The ideas in turnip around improving this are
definitely interesting though.<br>
<br>
<br>
Aside from all these points, a couple of other relevant things I've come
across on the topic:<br>
<br>
<ul>
<li><a class="moz-txt-link-freetext" href="http://myronmars.to/n/dev-blog/2013/07/the-plan-for-rspec-3">http://myronmars.to/n/dev-blog/2013/07/the-plan-for-rspec-3</a> - a
blog post from a core RSpec contributor with this quote: </li>
</ul>
<br>
"RSpec originated in a time before the existence of Cucumber/Gherkin,
and one of its early goals was to express things in natural language
that a project stakeholder could understand. In those early days, an
expression like team.should have(9).players made sense for the goals of
the project. Since then, Cucumber/Gherkin have emerged as a better
alternative for stakeholder-focused tests, and RSpec is rarely used for
that purpose today."<br>
<br>
RSpec uses cucumber to produce exectuable specs for its own codebase
(<a class="moz-txt-link-freetext" href="https://relishapp.com/rspec">https://relishapp.com/rspec</a>); could be a sign that it'll have more
focus on supporting testing at the unit & component level going
forward?<br>
<br>
<ul>
<li><a class="moz-txt-link-freetext" href="http://blog.mattwynne.net/2012/04/26/a-vision-for-cucumber-2-0/">http://blog.mattwynne.net/2012/04/26/a-vision-for-cucumber-2-0/</a> - a
blog post from a core cucumber contributor</li>
</ul>
<br>
This references the original developer of Turnip, saying 'Using RSpec as
the runner for Turnip hasn’t worked out so well.' Would love to know
more about why and whether this is still the case.<br>
<br>
<ul>
<li>For some reason you have to add capybara to your gemfile to use
the feature/scenario syntax in RSpec feature specs. I work on a lot of
APIs, so really don't need capybara as a dependency.</li>
</ul>
<ul>
<li>In Cucumber, I don't think the approach of adding modules to the
World object is clean way to reuse code. It makes them accessible in all
step definitions without namespacing. It does seem to be the most
documented approach though. I generally leave my ruby code in the
support folder and just access it within the step definitions using the
fully-qualified names.</li>
</ul>
<br>
Both frameworks have their pros & cons. Personally, I prefer
Cucumber over RSpec feature & request specs. as has no doubt come
across. But, the overwhelming resistance to cucumber within the
community is difficult to ignore. For now, I remain unconvinced by a lot
of the arguments against Cucumber. <br>
<br>
I should say though, both are great libraries & I'm definitely very
grateful to their contributors!<br>
<br>
<br>
<br>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><div
style="margin:0px"><font color="#444444"><b>Will Thomas<br>
</b></font></div>
</div>
<div
style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;margin:0px">
<span style="letter-spacing:0px"><font color="#444444"><br></font></span></div>
<div
style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;margin:0px"><font
color="#444444"><span style="letter-spacing:0px">The App Business</span><br>
</font></div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><div
style="font-size:medium;word-wrap:break-word"><div
style="word-wrap:break-word"><div style="word-wrap:break-word"><div
style="word-wrap:break-word">
<div style="word-wrap:break-word"><div style="word-wrap:break-word"><div
style="word-wrap:break-word"><div style="margin:0px"><div
style="font-size:12px;margin:0px"><div style="margin:0px"><div
style="margin:0px"><div style="margin:0px">
<div style="margin:0px"><div style="margin:0px"><div style="margin:0px"><div
style="margin:0px"><span style="letter-spacing:0px"><font
color="#444444"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt; color: rgb(68,
68, 68);"><span __postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;
text-decoration: underline; color: rgb(68, 68, 68);"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">20-24</span></span></span></span>
Broadwick Street</font></span></div><div style="margin:0px"><span
style="letter-spacing:0px"><font color="#444444">London W1F <span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">8HT</span></span></span></span></font></span></div>
<div style="margin:0px"><span style="letter-spacing:0px"><a
value="+442036579785" style="color:rgb(34,34,34)"><font color="#444444"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">+44</span></span></span></span>
203 657 9785</font></a></span></div><div style="margin:0px"><a
href="http://www.theappbusiness.com/" target="_blank"><font
color="#ff4400">www.theappbusiness.com</font></a></div>
<div style="margin:0px"><span style="letter-spacing:0px"><font
color="#444444"><br></font></span></div><div style="margin:0px"><a
href="http://www.theappbusiness.com/careers/" target="_blank"><font
color="#ff4400">Join the team: we're now 75+ strong and growing fast</font></a></div>
</div><div><div style="margin:0px"><div style="margin:0px"><a
href="http://www.thedrum.com/digital-census/2013" target="_blank"><font
color="#ff4400">The Drum Census 2013: ranked UK No.1 with <span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">1-50</span></span>
staff</font></a></div></div>
</div><div><font color="#444444"><br></font></div><div><font
color="#444444">Check out our latest thinking in our </font><a
href="http://www.theappbusiness.com/journal/" target="_blank"><font
color="#ff4400">journal</font></a><font color="#444444"> and follow us
on: </font></div>
<div style="margin:0px"><div style="margin:0px"><a
href="http://twitter.com/theappbusiness" target="_blank"><font
color="#ff4400">Twitter</font></a><font color="#444444"> • </font><a
href="http://www.linkedin.com/company/the-app-business" target="_blank"><font
color="#ff4400">LinkedIn</font></a><font color="#444444"> • </font><a
href="http://www.google.com/+TheappbusinessTAB" target="_blank"><font
color="#ff4400">Google+</font></a><font color="#444444"> • </font><a
href="http://dribbble.com/theappbusiness" target="_blank"><font
color="#ff4400">Dribbble</font></a><font color="#444444"> • </font><a
href="http://instagram.com/theappbusiness" target="_blank"><font
color="#ff4400">Instagram</font></a><font color="#444444"> • </font><a
href="http://www.facebook.com/theappbusiness" target="_blank"><font
color="#ff4400">Facebook</font></a></div>
</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><font
color="#444444" size="1"><br></font></div><div
style="word-wrap:break-word"><font color="#444444" size="1"><br></font></div>
<div style="word-wrap:break-word"><font color="#444444" size="1">The App
Business Limited is a company registered in England and Wales</font></div><div
style="word-wrap:break-word"><font color="#444444" size="1">Registered
number: 01897720</font></div></div>
<br>
<br>
<blockquote style="border: 0px none;"
cite="mid:CACgp2Z1qxsXcF--knAAyGLORC0sa9hmUCZGhHAjXQa61UF8WCw@mail.gmail.com"
type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="pbattley@gmail.com" photoname="Paul Battley"
src="cid:part1.04060503.01000609@theappbusiness.com"
name="postbox-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:pbattley@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Paul Battley</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">26 July 2014
14:17</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div><!----><br>Brilliant!
Somehow I never realised that. Despite having a version of<br>vim-cucumber
*that actually supports jumping*, I was absolutely sure<br>that it
wasn't possible. And absolutely wrong.<br><br>Paul.<br>_______________________________________________<br>Chat
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>Archives:
<a class="moz-txt-link-freetext" href="http://lists.lrug.org/pipermail/chat-lrug.org">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>Manage your
subscription: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/options.cgi/chat-lrug.org">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>List
info: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br></div></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="kerryjbuckley@gmail.com" photoname="Kerry Buckley"
src="cid:part2.03070407.01080102@theappbusiness.com"
name="postbox-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:kerryjbuckley@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Kerry Buckley</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">26 July 2014
12:32</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><style>body{font-family:Helvetica,Arial;font-size:13px}</style><div
style="font-family:Helvetica,Arial;font-size:13px; color:
rgba(0,0,0,1.0); margin: 0px; line-height: auto;" id="bloop_customfont">On
26 July 2014 at 12:30:13, Paul Battley (<a moz-do-not-send="true"
href="mailto:pbattley@gmail.com">pbattley@gmail.com</a>) wrote:</div> <p>Cucumber-vim
supports jumping to step definitions with ctrl-].</p><p>Kerry</p><div>_______________________________________________<br>Chat
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>Archives:
<a class="moz-txt-link-freetext" href="http://lists.lrug.org/pipermail/chat-lrug.org">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>Manage your
subscription: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/options.cgi/chat-lrug.org">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>List
info: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br></div></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="pbattley@gmail.com" photoname="Paul Battley"
src="cid:part1.04060503.01000609@theappbusiness.com"
name="postbox-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:pbattley@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Paul Battley</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">26 July 2014
12:30</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div><!----><br>All other
considerations aside, I find that the use of string matching<br>for
dispatch is an inconvenience when working with Cucumber. In my<br>editor[1],
I can go straight to the definition of a method just by<br>pressing a
key combo[2], which really helps in navigating unfamiliar<br>code. With
Cucumber, I have to use a lucky guess or just grep for a<br>distinctive
bit of the string.<br><br>Of course, *I* always put my own definitions
in sensible places etc.<br>etc., but in reality most projects are
collaborative and even though<br>all our collaborators are intelligent
and well-meaning people, we<br>don't all think in exactly the same way.<br><br>Perhaps
it's just a tooling problem - perhaps it's already been solved<br>and
I'm just blissfully ignorant! - but I do think that Cucumber's<br>string
matching presents a concrete difficulty, especially on larger<br>projects
and teams, and I think that this problem exists regardless of<br>any
overuse of parameters within regular expressions.<br><br>Paul.<br><br>1.
Vim with ctags and Ctrl-].<br>2. Unless someone's taken the
metaprogramming too far, of course.<br>_______________________________________________<br>Chat
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>Archives:
<a class="moz-txt-link-freetext" href="http://lists.lrug.org/pipermail/chat-lrug.org">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>Manage your
subscription: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/options.cgi/chat-lrug.org">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>List
info: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br></div></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="apremdas@gmail.com" photoname="Andrew Premdas"
src="cid:part4.01010801.09010301@theappbusiness.com"
name="postbox-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:apremdas@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Andrew Premdas</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">26 July 2014
01:24</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div dir="ltr"><br><div
class="gmail_extra"><br><br><div class="gmail_quote">On 25 July 2014
11:46, Murray Steele <span dir="ltr"><<a moz-do-not-send="true"
target="_blank" href="mailto:murray.steele@gmail.com">murray.steele@gmail.com</a>></span>
wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div
style="font-family:arial,sans-serif;font-size:13px" dir="ltr">I really
liked that article because it matches how I write rspec features :)<div>
<br></div><div>I like cucumber because of how it makes me think about
what the user journey I’m testing is actually about and for, but I
dislike cucumber because I think the regexp matching for step
definitions places an unnecessary burden on the developer. </div>
</div></div></blockquote><div><br><div>This is really unfortunate. The
fact that regex's are there in
Cucumber means that you 'can' do all sorts of stupid things with them.
If you do that will be a burden. However it doesn't mean you should do
this or have to do this. 50% of my step definitions have no parameters
at all, and I suspect less than 3% have more then one parameter. <br>
<br></div>We don't criticize Ruby for allowing us to write stupid code,
but it seems that we expect Cucumber to do more.<br> <br></div><blockquote
style="margin:0px 0px 0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div
style="font-family:arial,sans-serif;font-size:13px" dir="ltr">
<div><br></div><div>But I find that I write very cucumber-ish rspec
features. I’ll have a bit of “As a… I want to… In order to…” as the
name of the feature and then my scenario names will be a imperative
style “given…when…then…” describing what’s going on. The actual body of
the scenario will be a bunch of very high-level method calls like
“login_as_a_whatever_user”, “create_a_blah”, “search_for_something”,
“check_that_widget_appears_in_the_place”.</div>
<div><br></div><div>I try to keep raw capybara calls out of the scenario
body and only use it in those methods. I’m not totally strict about
that, I might allow myself a visit “/some/path” or click_on ‘some label’
as I think they’re pretty readable. I also find that I’m not that
interested in reuse of these methods. I might extract some common
helpers for dealing with login or dealing with common UI patterns, but
mostly the methods live at the bottom of the feature file they’re used
in.</div>
<div><br></div><div>I think this gives me the same thoughtfulness and
readability of a cucumber feature, but without the context switch of
dealing with gherkin, step_definitions and World(all the helpers).</div></div><div
style="font-family:arial,sans-serif;font-size:13px">
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div
class="h5">On 25 July 2014 10:26, Joel Chippindale <span dir="ltr"><<a
moz-do-not-send="true" target="_blank"
href="mailto:joel.chippindale@futurelearn.com">joel.chippindale@futurelearn.com</a>></span>
wrote:<br>
</div></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px
solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div><div
class="h5"><div dir="ltr">We recently blogged about how, at FutureLearn,
we write readable feature tests with RSpec*, see <a
moz-do-not-send="true" target="_blank"
href="https://about.futurelearn.com/blog/how-we-write-readable-feature-tests-with-rspec/">https://about.futurelearn.com/blog/how-we-write-readable-feature-tests-with-rspec/</a>,
and it made me wonder how common this approach was.<div>
<br></div><div>Are any of you using this approach already? If so, how
are you finding it?</div><div><br></div><div>J.<br><div><br></div><div><br></div><div>*
Hat tip to the developers at Econsultancy who introduced me to this way
of using RSpec.</div>
</div></div>
<br></div></div><div class="">_______________________________________________<br>
Chat mailing list<br>
<a moz-do-not-send="true" target="_blank"
href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
Archives: <a moz-do-not-send="true" target="_blank"
href="http://lists.lrug.org/pipermail/chat-lrug.org">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
Manage your subscription: <a moz-do-not-send="true" target="_blank"
href="http://lists.lrug.org/options.cgi/chat-lrug.org">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
List info: <a moz-do-not-send="true" target="_blank"
href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></div></blockquote></div><br></div>
<br>_______________________________________________<br>
Chat mailing list<br>
<a moz-do-not-send="true" href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
Archives: <a moz-do-not-send="true" target="_blank"
href="http://lists.lrug.org/pipermail/chat-lrug.org">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
Manage your subscription: <a moz-do-not-send="true" target="_blank"
href="http://lists.lrug.org/options.cgi/chat-lrug.org">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
List info: <a moz-do-not-send="true" target="_blank"
href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div>------------------------</div>Andrew
Premdas<div><a moz-do-not-send="true" target="_blank"
href="http://blog.andrew.premdas.org">blog.andrew.premdas.org</a></div>
</div></div>
<pre wrap="">_______________________________________________
Chat mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a>
Archives: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/pipermail/chat-lrug.org">http://lists.lrug.org/pipermail/chat-lrug.org</a>
Manage your subscription: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/options.cgi/chat-lrug.org">http://lists.lrug.org/options.cgi/chat-lrug.org</a>
List info: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a>
</pre></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="murray.steele@gmail.com" photoname="Murray Steele"
src="cid:part5.09080301.08000701@theappbusiness.com"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:murray.steele@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Murray Steele</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">25 July 2014
11:46</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div dir="ltr"><div
style="font-family:arial,sans-serif;font-size:13px" dir="ltr">I really
liked that article because it matches how I write rspec features :)<div><br></div><div>I
like cucumber because of how it makes me think about what the user
journey I’m testing is actually about and for, but I dislike cucumber
because I think the regexp matching for step definitions places an
unnecessary burden on the developer. </div>
<div><br></div><div>But I find that I write very cucumber-ish rspec
features. I’ll have a bit of “As a… I want to… In order to…” as the
name of the feature and then my scenario names will be a imperative
style “given…when…then…” describing what’s going on. The actual body of
the scenario will be a bunch of very high-level method calls like
“login_as_a_whatever_user”, “create_a_blah”, “search_for_something”,
“check_that_widget_appears_in_the_place”.</div>
<div><br></div><div>I try to keep raw capybara calls out of the scenario
body and only use it in those methods. I’m not totally strict about
that, I might allow myself a visit “/some/path” or click_on ‘some label’
as I think they’re pretty readable. I also find that I’m not that
interested in reuse of these methods. I might extract some common
helpers for dealing with login or dealing with common UI patterns, but
mostly the methods live at the bottom of the feature file they’re used
in.</div>
<div><br></div><div>I think this gives me the same thoughtfulness and
readability of a cucumber feature, but without the context switch of
dealing with gherkin, step_definitions and World(all the helpers).</div></div><div
style="font-family:arial,sans-serif;font-size:13px" class="">
</div></div><div class="gmail_extra"><br><br><br></div>
<div>_______________________________________________<br>Chat mailing
list<br><a class="moz-txt-link-abbreviated" href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>Archives:
<a class="moz-txt-link-freetext" href="http://lists.lrug.org/pipermail/chat-lrug.org">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>Manage your
subscription: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/options.cgi/chat-lrug.org">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>List
info: <a class="moz-txt-link-freetext" href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br></div></div>
</blockquote>
<br>
<div class="moz-signature"><br>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><div
style="word-wrap:break-word"><font color="#444444" size="1">Office
location: <span __postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">20-24</span></span></span></span>
Broadwick Street, London, United Kingdom, W1F <span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">8HT</span></span></span></span></font></div></div>
</div>
</body></html>