Rspec-ruby in the BDD (Behavior Driven Development)

Rspec definition of
ruby version of BDD development tools. You can change your coding practices, the introduction of test-first coding habits.

Installation RSpec
GEM the install RSpec with RSpec development process is as follows:

  • Write a test. The behavior of a small element of the test system is described.
  • Run the test. Since none build the code for the corresponding part of the system, the test fails. This important step is to test your test cases, test cases test whether a failure when it should fail.
  • Write enough code to make the test pass.
  • Run testing, inspection test was successful.

reference:
  • Very full reference list of resources http://www.javaeye.com/topic/166208
  • Great Rspec Chinese tutorial http://www.ibm.com/developerworks/cn/web/wa-rspec/index.html
Published 46 original articles · won praise 7 · views 80000 +

Guess you like

Origin blog.csdn.net/yangbo_hr/article/details/2296679