Running rspec on Aptana 3

痞子三分冷 提交于 2019-12-11 02:44:52

问题


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?


回答1:


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




回答2:


Aptana ships with an RSpec bundle (I guess it's called a bundle, but anyways you should have it).

Go to Commands -> RSpec -> Run Single Example (or just press Ctrl + Shift + R) while having the game_spec.rb file selected and it should run only that spec.



来源:https://stackoverflow.com/questions/6894209/running-rspec-on-aptana-3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!