RSpec1 is a testing framework for Ruby. RSpec is available to us as a domain-specific language2 (DSL) written in Ruby and used to test Ruby code. RSpec tests the behavior of Ruby code and considers itself to be a “behavior-driven development” (BDD) framework. RSpec is most widely used for testing Rails applications, but can be used to test any Ruby code.
Ruby on Rails by default comes with the testing framework Test::Unit. In the previous chapter when we used the rails new command to create our Rails blog application, we added the --skip-test option to disable Test::Unit ...