如何使用Rspec的早期版本运行Specs? [英] How do I run my Specs with the previous version of Rspec?

查看:82
本文介绍了如何使用Rspec的早期版本运行Specs?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在我的一台机器上关注RSpec教程,希望能学习更多有关BDD和TDD的知识.我的设置是使用Rails 2.2.2和Rspec 1.1.12

I have been following an RSpec tutorial on one of my machines, in the hope of learning more about BDD and TDD. My setup was with Rails 2.2.2 and Rspec 1.1.12

今晚,我决定继续使用我的主计算机,并将代码从便携式计算机移至台式机.没有RSpec,我安装了gem. . .

Tonight I decided to continue on my primary machine and moved my code from my portable to my desktop. Not having RSpec, i installed the gem . . .

sudo gem install rspec
sudo gem install rspec-rails

争吵和卑鄙的人!安装了新版本的Rspec! 1.2.0!现在我的测试到处都失败了!尽管我完全打算跟进并学习最新版本,但我真的很想完成本教程的内容而无需重新开始.我想知道.有没有一种方法可以安装并指定我要针对以前的Rspec 1.2.12运行我的代码?

Strife and Calumny! The new version of Rspec installed! 1.2.0! And now my tests are failing all over the place! While I fully intend to follow up and learn the most up to date version, I would really like to complete what's left of the tutorial without having to start over. I am wondering. Is there a way to install and specify that I would like to run my code against the previous Rspec, 1.2.12?

推荐答案

您可以使用指定的VERSION卸载并重新安装.在此处解释.

You could uninstall and reinstall with VERSION specified. Explained here.

这篇关于如何使用Rspec的早期版本运行Specs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆