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 137925 - navigator etc needs to understand the new Rails test syntax
Summary: navigator etc needs to understand the new Rails test syntax
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-23 04:44 UTC by jamespb
Modified: 2008-06-24 19:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jamespb 2008-06-23 04:44:42 UTC
Edge rails is moving to declaring Test::Unit tests like this:

test "something should happen" do
  assert whatever
end

Instead of the old

def test_something_should_happen
  ...
end

NetBeans is going to need to understand this for things like the navigator and the collapse-bodies (shift-cmd-+, -)
commands.

In a perfect world, you'll come up with a general solution for this.  RSpec does the same sort of thing (class methods
that create methods), and lots of people do it in their own code.
Comment 1 Torbjorn Norbye 2008-06-24 19:41:57 UTC
Fixed in changeset fb4ab83d4d80, and build #2442 or later from http://deadlock.netbeans.org/hudson/job/trunk/. (This is
6.5 milestone 2, milestone 1 is now in high resistance).

The solution shows test, describe, context, and a few other rspec-like things as navigator items (and folded regions),
along with a different icon. If you see other constructs that should be identified, let me know. This currently only
happens in files that look like tests (e.g. _spec, test_, _test); if you encounter files where it doesn't kick in where
you think it should, also let me know about that.  Thanks for the report!