Hello,
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 online[3].
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.
2. 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.
3. 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] Search - This book was the first come out on Google, I have not read it or have any affiliation.
[2] http://rspec.info/
[3] an introduction to RSpec - Part I - David Chelimsky Treehouse Blog | Learn programming, design, and more—all online and on your own time. Ruby for Newbies: Testing with Rspec | Envato Tuts+
[4] http://cukes.info/
[5] Redirecting to Google Groups
Panagiotis (atmosx) Atmatzidis
email: atma@convalesco.org
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
···
On 13 Μαρ 2014, at 08:18 , Selvag Ruby <lists@ruby-forum.com> wrote: