问题描述
我正在尝试在Aptana 3上运行 2分钟教程.
I am trying to make the 2 minute tutorial run on Aptana 3.
我已经创建了两个 .rb
文件,但是我想知道应该运行哪个按钮或命令来使我的 game_spec.rb
文件运行.
I've already created both .rb
files, but I am left wondering what button or command should I run to make my game_spec.rb
file run.
如何在Aptana中运行我的rspec测试?
How to run my rspec tests in Aptana?
推荐答案
该教程不太正确.首先,您需要将game_spec.rb放到spec/文件夹中.
The tutorial is not quite correct.First, you need to place you game_spec.rb into spec/ folder.
本教程假定使用终端,因此您需要单击工具栏上的打开终端"操作,然后键入(或复制/粘贴)
The tutorial assumes to use Terminal so you need to click on "Open Terminal" action on toolbar, then type (or copy/paste)
rspec spec/game_spec.rb --color --format doc
或者,您可以使用命令Commands/RSpec/Run Examples菜单(也有快捷方式),但是它需要修复RSpec Aptana捆绑包.请按照下列步骤操作:
Alternatively, you could use menu Commands/RSpec/Run Examples (there is a shortcut too for it), but it requires fixing the RSpec Aptana bundle. Follow these steps:
- 打开菜单Commands/RSpec/编辑包
- 找到并打开lib/lib/spec/mate/runner.rb
- 编辑第8和11行,将"spec"替换为"rspec"
- 保存文件.重新启动Aptana Studio.
此外,我将定义TM_RSPEC_OPTS环境变量并将其设置为"--format doc"
Also, I'd define TM_RSPEC_OPTS environment variable and set it to "--format doc"
干杯,最高
这篇关于在Aptana 3上运行rspec的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!