cornercorner
FeaturesPluginsPlatformDocs & SupportCommunityPartners

Bug 137925 - navigator etc needs to understand the new Rails test syntax
: navigator etc needs to understand the new Rails test syntax
Status: RESOLVED FIXED
: ruby
Editing
: 6.5
: Macintosh All
: P3 (vote)
: 6.5
Assigned To:
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-06-23 04:44 by
Modified: 2008-06-24 19:41 (History)
Issue Type: DEFECT
:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-06-23 04:44:42
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 From 2008-06-24 19:41:57 -------
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!