# Why we use RSpec

**URL:** <https://www.ruby-forum.com/t/why-we-use-rspec/182593>\
**Category:** RSpec\
**Created:** [January 30, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/why-we-use-rspec/182593 "2010-01-30T16:35:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravi\_singh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@ravi\_singh](https://www.ruby-forum.com/u/ravi_singh)\
**Post date:** [January 30, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/why-we-use-rspec/182593/1 "2010-01-30T16:35:09Z")

</div>

Hi all,

I am new to the RSpec, I have many questions related to the RSpec.

1. Why one should use RSpec instead of other testing technique
2. Which are the best tools than RSpec
3. Where can i get RSpec demo

---

<div class="post-metadata">

**Author:** ![ravi\_singh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@ravi\_singh](https://www.ruby-forum.com/u/ravi_singh)\
**Post date:** [January 31, 2010, 5:39pm UTC](https://www.ruby-forum.com/t/why-we-use-rspec/182593/2 "2010-01-31T17:39:25Z")

</div>

On Jan 30, 10:35 am, Ravi S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi all,
> 
> I am new to the RSpec, I have many questions related to the RSpec.
> 
> 1. Why one should use RSpec instead of other testing technique

RSpec is designed for Behavior Driven Development, whereas many  
testing tools are designed for Test Driven Development or even post-  
development testing. So basically, your question could be rephrased  
as “What are the benefits of Behavior Driven Development?” Here are a  
few places to look for more introductory material:

[http://behaviour-driven.org/Introduction](http://behaviour-driven.org/Introduction)

[http://en.wikipedia.org/wiki/Behavior\_Driven\_Development](http://en.wikipedia.org/wiki/Behavior_Driven_Development)

> 1. Which are the best tools than RSpec

Many people use RSpec with Cucumber. In fact, the RSpec book (linked  
below) talks about how to use both of them for effective behavior  
driven development. It’s important to remember that tools cannot be  
measured on an abstract, absolute scale. (i.e. There is no _best_  
tool because some tools were designed to do different things.) RSpec  
is often compared to Ruby’s built-in unit testing framework  
(Test::Unit), and many people like the shoulda macros that work with  
either RSpec or Test::Unit.

RSpec book: [http://www.pragprog.com/titles/achbd/the-rspec-book](http://www.pragprog.com/titles/achbd/the-rspec-book)

Test::Unit: [http://en.wikibooks.org/wiki/Ruby\_Programming/Unit\_testing](http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing)

Shoulda macros: [http://github.com/thoughtbot/shoulda](http://github.com/thoughtbot/shoulda)

> 1. Where can i get RSpec demo

There are several demos available online. Here’s a demo that shows  
RSpec, Test::Unit, and Cucumber using Ruby on Rails:  
[http://github.com/marcoow/rspec-demo](http://github.com/marcoow/rspec-demo)

There’s also a lengthy introduction to RSpec available on PeepCode:  
[http://peepcode.com/products/rspec-basics](http://peepcode.com/products/rspec-basics)

I hope that helps!

---

<div class="post-metadata">

**Author:** ![ravi\_singh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@ravi\_singh](https://www.ruby-forum.com/u/ravi_singh)\
**Post date:** [January 31, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/why-we-use-rspec/182593/3 "2010-01-31T18:13:53Z")

</div>

What is the difference between test driven development & behavior driven  
development, which one is better.

what are the options available in BDD.

---

<div class="post-metadata">

**Author:** ![ravi\_singh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@ravi\_singh](https://www.ruby-forum.com/u/ravi_singh)\
**Post date:** [January 31, 2010, 8:11pm UTC](https://www.ruby-forum.com/t/why-we-use-rspec/182593/4 "2010-01-31T20:11:00Z")

</div>

On Jan 31, 2010, at 9:13 AM, Ravi S. wrote:

> What is the difference between test driven development & behavior driven  
> development, which one is better.
> 
> what are the options available in BDD.

Make up a simple project like a blog that you can do in couple of hours.  
Try it using one, then the other technology. See which you like better.  
Your research will be the ultimate arbiter of which is better for you  
and your project. Nobody can tell you which will feel more natural to  
you.

---

<div class="post-metadata">

**Author:** ![ravi\_singh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/94ad74/32.png) [@ravi\_singh](https://www.ruby-forum.com/u/ravi_singh)\
**Post date:** [January 31, 2010, 6:50pm UTC](https://www.ruby-forum.com/t/why-we-use-rspec/182593/5 "2010-01-31T18:50:15Z")

</div>

On Jan 31, 2010, at 5:13 pm, Ravi S. wrote:

> What is the difference between test driven development & behavior driven  
> development, which one is better.

The link to [behaviour-driven.org](http://behaviour-driven.org) that Tristam already posted[1] tells  
you exactly that. Did you read it?

I’m having flashbacks to an older thread here :-/

> what are the options available in BDD.

Your question is not clear. Can you be more specific?

Ashley

[1] [BDD vs TDD: Introduction to BDD and Test Driven Development](http://behaviour-driven.org/Introduction)

–

> **[PatchSpace](http://www.patchspace.co.uk/)**

> **[Ashley Moran - United Kingdom | Professional Profile | LinkedIn](https://www.linkedin.com/in/ashleymoran)**
>
> Highly skilled Security Architect with a proven ability to deliver impactful security… · Location: United Kingdom. 500+ connections on LinkedIn. View Ashley Moran’s profile on LinkedIn, a professional community of 1 billion members.
