开发者

Running rspec on Aptana 3

开发者 https://www.devze.com 2023-03-24 00:12 出处:网络
开发者_开发知识库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 f
开发者_开发知识库

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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消