This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 119708 - Provide context menu for running/debugging a single test method
Summary: Provide context menu for running/debugging a single test method
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Testing (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
: 129920 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-22 23:08 UTC by jtanium
Modified: 2009-03-11 14:10 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jtanium 2007-10-22 23:08:34 UTC
Right now I when I want to use the integrated debugger, I have to run the entire test.  I would like to be able to run
debug on a single method of the test.  For example, if I had the following test:
class MyTest < Test::Unit::TestCase
  def test_action_1
    # ...
  end

  def test_action_2
    # ...
  end
end

I would like to be able to right-click on 'test_action_2' and have the following options:
...
----------------------
Run File
Test File
Debug File
Run test_action_2
Debug test_action_2
New Watch...
Toggle Line Breakpoint
----------------------
...
This would be an immensely helpful feature.
Comment 1 Torbjorn Norbye 2007-10-22 23:17:05 UTC
This feature was added in the optional RSpec module (it works not only for RSpec tests but Test::Unit tests as well). 
It lives in the optional module since this functionality was added after feature freeze (WAY after feature freeze).
You'll find it listed under October 12th here: 
http://wiki.netbeans.org/wiki/view/RubyRecentChanges

The RSpec module is in included in the build on 
http://deadlock.netbeans.org/hudson/job/ruby/

It doesn't work as context menu actions in the navigator; you press a keybinding (which you have to assign) to run/debug
the test around the caret.
Comment 2 Martin Krauskopf 2008-03-19 23:53:51 UTC
*** Issue 129920 has been marked as a duplicate of this issue. ***
Comment 3 Erno Mononen 2009-03-11 14:10:22 UTC
The RSpec module has been part of trunk for a while already, so I'm closing this issue. The default keybindings (on
Linux) are alt-shift-f6 (run focused test) and alt-shift-f5 (debug).