在 Aptana 3 上运行 rspec [英] Running rspec on Aptana 3

查看:24
本文介绍了在 Aptana 3 上运行 rspec的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Aptana 3 上运行 2 分钟教程.

我已经创建了两个 .rb 文件,但我想知道应该运行什么按钮或命令来运行我的 game_spec.rb 文件.>

如何在 Aptana 中运行我的 rspec 测试?

解决方案

教程不太正确.首先,您需要将 game_spec.rb 放入 spec/文件夹中.

本教程假设使用终端,因此您需要单击工具栏上的打开终端"操作,然后键入(或复制/粘贴)

rspec spec/game_spec.rb --color --format 文档

或者,您可以使用菜单命令/RSpec/运行示例(也有一个快捷方式),但它需要修复 RSpec Aptana 包.请按照以下步骤操作:

  1. 打开菜单 Commands/RSpec/Edit the bundle
  2. 找到并打开 lib/lib/spec/mate/runner.rb
  3. 编辑第 8 行和第 11 行以将 'spec' 替换为 'rspec'
  4. 保存文件.重新启动 Aptana Studio.

另外,我会定义 TM_RSPEC_OPTS 环境变量并将其设置为--format doc"

雪儿,最大

I am trying to make the 2 minute tutorial run on Aptana 3.

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.

How to run my rspec tests in Aptana?

解决方案

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

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:

  1. open menu Commands/RSpec/Edit the bundle
  2. Find and open lib/lib/spec/mate/runner.rb
  3. Edit lines 8 and 11 to replace 'spec' with 'rspec'
  4. Save the file. Restart Aptana Studio.

Also, I'd define TM_RSPEC_OPTS environment variable and set it to "--format doc"

Chers, Max

这篇关于在 Aptana 3 上运行 rspec的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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