August 28, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

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.

 

 


Sitemap | Contact Us

Rocket Fuel