What does rspec gem do? It is named “Behaviour driven development tool”, but these words do not make something clear.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
RSpec is a gem for writing tests for your application. Similar in function to Test:Unit (which comes with Rails), though how they go about it is different.
There are various testing frameworks which allow you to follow a development process called Test (or Behavior) Driven Development. This development style states, basically, that you write tests for a feature or piece of code which will at first fail (because you haven’t written the feature yet). You then write the code for that feature until the test passes. It seems backwards, but it offers several benefits over other methods of development. I found the railscast episode “How I Test” to be very helpful in learning test driven development and RSpec (since that’s what Ryan uses for testing in the episode).