Rspec Tutorial

Hi Everybody,

Greetings!!

I want to use rspec for my applications. Please guide me with the Rspec tutorial.

I want a good example to start with.

Please help me by providing good tutorials on Rspec to start with.

I actually followed the example from http://rspec.info

Please guide me on more examples.

Waiting for your reply.

Rails ROR wrote:

Please guide me on more examples.

http://pragprog.com/titles/achbd/the-rspec-book

describe "Person learning rSpec" do   fixtures :people

  before(:each) do     @you = people(:you)   end

  it "should buy the rSpec book" do     books = @you.books     books.should include(:the_rspec_book)   end

end

Besides the already mentioned book, the PeepCode screencasts are very good introductory material.

FWIW,

Hi Thank you for your response.

Are there any free books that we can download for Rspec?

If any, Please guide me on that.

Thanks in advance

Hi, I really doubt that any one is going to write a book and make it free to download. Next, did you try google.com in regards to finding the information on RSpec tutorials? In any case, I would recommend seeing what’s available on railscasts.com because I’m sure that Ryan Bates has done one or more screencasts on RSpec and BDD. Also, I’m sure that you can find many blog posts on the subject as well.

Good luck,

-Conrad

Hi, I have tried in google for Rspec. I thought there might be few books also.

Thankyou for your reply.

Rails ROR wrote:

Hi, I have tried in google for Rspec. I thought there might be few books also.

Just an idea, but maybe it would be useful to find some open source projects that are using rSpec and take a look at their specs. That should give you a good idea of how people are using rSpec in the real world.

And there are plenty of bloggers who have written about RSpec: David Chelimsky (the 'god-father' of RSpec), Pat Maddox, ...

There's also a google group for RSpec.

The best source IS the RSpec Book which is in beta from the Pragmatic Programmer, the PDF version isn't that expensive.

The problem is that RSpec like almost everything in the Ruby/Rails environment is evolving rapidly.

This is not a bug. It's a feature! :slight_smile: