简体   繁体   English

学习Ruby on Rails“ RSpec”

[英]Learning Ruby on Rails “RSpec”

I am following learn by example ruby book by michael hart, the book tells you to do bundle install and then generate the rspec:install. 我正在按照Michael Hart的示例红宝石书进行学习,该书告诉您进行捆绑安装,然后生成rspec:install。 I am running 3.0.4 rails and 1.9.2 ruby. 我正在运行3.0.4 rails和1.9.2 ruby​​。 I get the answer cannot find generator rspec install. 我得到的答案找不到发电机rspec安装。 Could anybody please enlighten me as to where the rspec should be. 任何人都可以启发我有关rspec应该在哪里。

Thank you 谢谢

Open up the Gemfile of your rails project and write : 打开rails项目的Gemfile并编写:

gem "rspec-rails"

Then execute bundle install. 然后执行捆绑软件安装。 Rspec resides in folder spec/ of your rails project. Rspec驻留在rails项目的文件夹spec /中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM