Bug 151652 - Shoulda testing support
Shoulda testing support
Status: RESOLVED FIXED
Product: ruby
Classification: Unclassified
Component: Testing
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Erno Mononen
issues@ruby
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-29 00:09 UTC by nigel_bris
Modified: 2009-02-19 23:01 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nigel_bris 2008-10-29 00:09:27 UTC
Shoulda (http://www.thoughtbot.com/projects/shoulda) is a new testing plugin for rails. It reduces the amount of test code considerably and has become 
quite popular.

Currently the entire test file feature works within NetBeans, the single test does not (it cant pickup the the methods start with shoulda)
Comment 1 Erno Mononen 2008-10-29 09:45:25 UTC
Targetting 7.0, though I have to look into this in more details. But if shoulda supports running a single test the same 
way as Test/Unit does, then implementing this should be just a question of finding the current method. In addition Go 
to Source (for passed methods) / run again / debug actions don't work for Shoulda yet.

BTW, in daily builds there is slightly improved support for Shoulda, see issue 150613 (just in case you didn't notice 
the issue).
Comment 2 Erno Mononen 2009-01-15 09:07:34 UTC
Should be done now, run focused test in the editor and run again / debug actions in the test results view should work 
now. Changesets 11d70f94aecd and 6039341cf9b3. Let us know if you find any problems.
Comment 3 Quality Engineering 2009-01-16 07:25:07 UTC
Integrated into 'main-golden', will be available in build *200901160201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/6039341cf9b3
User: Erno Mononen <emononen@netbeans.org>
Log: #151652: Shoulda testing support
- made the run again / debug actions in the test result tree work with shoulda tests
Comment 4 nigel_bris 2009-01-18 11:15:48 UTC
Tested and works great....
Comment 5 nigel_bris 2009-01-23 07:20:42 UTC
Found 2 issues after using for the last week

1. Test will only run if they have a context so below does not run
class UserTest < ActiveSupport::TestCase
  should "be true" do
    assert true
  end
end
----------------------
2. Spaces at end of test OR context name stops test from running
  context "good " do
    should "be true " do
      assert true
    end
  end


Comment 6 Erno Mononen 2009-01-23 11:59:50 UTC
Thanks for catching these, I'm working on a fix.
Comment 7 Erno Mononen 2009-01-23 14:44:15 UTC
Those issues should be fixed now in #2408120e6511 (there'll be a notification here when the fixes get integrated), 
please give it a try and let us know again whether you still face problems.
Comment 8 Quality Engineering 2009-01-24 18:53:24 UTC
Integrated into 'main-golden', will be available in build *200901241401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2408120e6511
User: Erno Mononen <emononen@netbeans.org>
Log: #151652: Shoulda testing support
- fixed two issues with running focused test:
	- 'should' without 'context'
	- spaces in names
Comment 9 nigel_bris 2009-01-25 02:34:45 UTC
Tested both little tweaks and they work great...  Thanks for such fast response....


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo