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:
- open menu Commands/RSpec/Edit the bundle
- Find and open lib/lib/spec/mate/runner.rb
- Edit lines 8 and 11 to replace 'spec' with 'rspec'
- 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.
精彩评论