Forum: Ruby on Rails I want to be clear about RSpec.

Cc7107cb48ea5e9d6b096f4c7fdf2bb1?d=identicon&s=25 Selvag Ruby (selvag1005)
on 2014-03-13 08:05
Can you say the easiest tutorial/guidance to learn RSpec?
Actually I'm reading 'The RSpec Book', there are two things explained
'RSpec' and 'Cucumber'.

1. Should I learn both of these for testing?
2. What is the forum to RSpec?
3. What's the first to write, .rspec or .rb?
Ec2c1a36301b0223c3e281bd2ec3f37a?d=identicon&s=25 Dave Aronson (Guest)
on 2014-03-13 13:12
(Received via mailing list)
On Thu, Mar 13, 2014 at 3:05 AM, Selvag Ruby <lists@ruby-forum.com>
wrote:

> Can you say the easiest tutorial/guidance to learn RSpec?
> Actually I'm reading 'The RSpec Book', there are two things explained
> 'RSpec' and 'Cucumber'.
>
> 1. Should I learn both of these for testing?

A while back, someone wrote something I found very insightful and
useful, to the effect of: don't think of Cucumber as a *testing* tool,
but rather a *collaboration* tool.  Having tested many projects with
and without it, I've formed my opinion:

If you have a non-technical stakeholder who wants to get involved in
reading, and maybe even writing, the actual tests themselves (not a
summary, report, translation, etc.), then Cucumber is an excellent
tool to let them do so, at the top layer (don't let them at the step
definitions!).  However, in the *other* 99.999% of cases, it's just
not worth the hassles.

> 3. What's the first to write, .rspec or .rb?

RSpec tests are often also .rb files.  Or do you mean test-code versus
production-code?  That's a whole 'nother argument, bringing up
Test-First vs. TDD vs. BDD vs. ATDD.  It's enough to give you ADD!

-Dave

--
Dave Aronson, FREELANCE SOFTWARE DEVELOPER LOOKING FOR REMOTE CONTRACTS
(or temp jobs, or in/near Fairfax VA; see www.Codosaur.us for details);
see also www.PullRequestRoulette.com, Blog.Codosaur.us, www.Dare2XL.com
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.