Can't run individual unit test with build 802 Follow
Hi Folks
Prior to build 802 if I positioned the caret in the body of a unit test and pressed Ctrl-Shft-F10 Rubymine would run just that test.
Now when I press Ctrl-Shft-F10 I get an error dialogue saying "Test class not found".
If I press Ctrl-Shft-F10 outside of a method body Rubymine runs all the tests as normal.
As I mentioned this is in build 802. I am running Rubymine on Ubuntu 8.10.
Any suggestions.
Thanks
Regards, Tony
Please sign in to leave a comment.
Hi,
Please vote/watch For a simple functional Rails test, ^+Shift+F10 doesn't work
Regards,
KIR
Hi Tony,
Just mark your "test" directory as "Test Sources" in Settings | Project Structure | Directories
Hi Roman/Kirill
Thanks - I am now able to run a single test again.
Regards, Tony
Maybe I'm too late but afaik all Rails projects have a test directory with just tests - why is this no default? Or would it be if I'd let RubyMine create the project?
From Eclipse I've seen that it automagically detects if a class is a test (as it inherits from some known test super class) and offers a "Run as Test.." option in the context menu...
Finally, the shortcut doesn't work for me (using the MacOS X key map) but I don't find how I might assign it - any hints?
If your use spec tests such directory will have name "spec" . RubyMine 1.1 should automatically mark "spec" and "test" folder as tests folders.
RubyMine also automatically detects if class extends Test::Unit::TestCase, actually this settings is necessary for internal optimization purposes. RM will run single test method if you mouse click(or place cursor) in context of test method/test closure. Run single test class if your click in context of test class and whole file - if outside test class.
Please show me screenshot of context menu.

E.g. this is mine
You are correct, this perfectly works in a new project...
This works as you say, but I was referring to the context menu reflecting this fact. This would make it more obvious what you can do, but the way it works is completely sufficient - simple is beautiful.
Should have opened my eyes before asking - my context menu looks exactly the same and the shortcut shown works perfectly - now I'll probably never forget it
Finally, attempting to run all tests in a folder fails. These are the error messages:
The first is hopefully simple to resolve (didn't try it yet) but the second seems to be a general problem. Or may it be related to running this with JRuby (1.2)?
Yes, it is related to JRuby
Try to enable ObjectSpace using -X+O I will also check it
Perfectly works and doesn't have the problems I've mentioned in .
It maybe worth to mention how to set this option: Run | Edit Configurations and then the "Edit Defaults" button on the lower left. There I've added the "-X+O" to the Ruby arguments for Test::Unit (maybe required for others also).