Want to understand the RSpec code

Guide me to get good knowledge in RSpec.
there are two things explained as’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?


On 13 Μαρ 2014, at 08:18 , Selvag R. [email protected] wrote:

Guide me to get good knowledge in RSpec.

The best guide I can think of is writing code and buying a book[1] but
for starters you can start here[2]. There are several tutorials

there are two things explained as’RSpec’ and ‘Cucumber’.

Cucumber[4] is a testing framework for behavioral driven development
that can work with Rspec. It’s somewhat easier, higher level abstraction
compared to Rspec. I’d stick to Rspec for starters though, leaving
Cucumber aside.

  1. Should I learn both of these for testing?

No. If you learn Rspec, cucumber will become self-explainatory.

  1. What is the forum to RSpec?

No forum, but there’s a google group (mailing list) like this one[5].
You can ask rspec questions here though, I’m sure we have experienced
rspec users.

  1. What’s the first to write, .rspec or .rb?

If you don’t know ruby you won’t be able to write specs, no matter what
the framework is. Rspec is used by Rails people mostly, that’s why
you’ll find lots of Rspec-Rails related tutorials online. Ruby uses the
minitest framework which is equally powerful. If you are going to use
pure ruby and not rails/sinatra I’d say go with MiniTest instead of
Rspec. However, once you get your way through either of those, the other
will come very easy. All you need to learn is the syntax and methods of
each testing framework.

Although in BDD or TDD you write test FIRST for the to fail and THEN you
write the code to PASS them, you have to be familiar with basic ruby
concepts, otherwise there’s no point in pursuing TDD/BDD. These are
somewhat the third step the first two being:

  1. Learn ruby basics
  2. Learn to write programs in ruby that do useful things
    and only then…
  3. consider TDD because is a very good practice in production and will
    help you avoid buggy code.

Best regards,

Posted via http://www.ruby-forum.com/.

[1] http://pragprog.com/book/achbd/the-rspec-book - This book was the
first come out on Google, I have not read it or have any affiliation.
[2] http://rspec.info/
[4] http://cukes.info/
[5] https://groups.google.com/forum/#!forum/rspec

Panagiotis (atmosx) Atmatzidis

email: [email protected]
URL: http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

“The fool doth think he is wise, but the wise man knows himself to be a
fool.” - William Shakespeare

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs