dcsimg
August 18, 2018
Hot Topics:

Apply Behavior Driven Development to Ruby on Rails with Rspec

  • February 4, 2010
  • By Saurabh Bhatia
  • Send Email »
  • More Articles »

Applying the Behavior Driven Development (BDD) methodology with a Ruby-based BDD framework allows you to write system requirements in a Ruby format first and then write Ruby code for the particular features of those requirements. Because the Ruby format is similar to plain English, business analysts and the people gathering the requirements can participate in the development process.

A few different Ruby-based BDD frameworks are available. RSpec, Cucumber, and Shoulda are the most popular. Find out how RSpec works by using the use case of an employee information manager.

BDD mandates that you write tests for each step of the process, which leads to cleaner code. The BDD process begins with the development team creating a scenario, for which they describe each feature. The initial scenario inevitably fails. The team subsequently defines each step (iterative test) and writes the application code for each feature. They also refactor the code when the scenario passes each step.



Read the full story at Web Developer's Virtual Library:
Apply Behavior Driven Development to Ruby on Rails with Rspec






Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.

Sitemap

Thanks for your registration, follow us on our social networks to keep up-to-date