Know of a Linux or Windows editor / IDE with support for TDD for RoR?

I saw a demo of VisualStudio's support for TDD for C++ (or C#, I can't recall which) this past weekend and was impressed. Anybody know of an editor or IDE for Linux (Ubuntu specifically) or Windows that has built-in support for TDD for either Ruby or Rails?

Rake comes with great support for unit testing with Test::Unit out of the box, you don’t need an IDE to hook it all up for you. You can define a Rake::TestTask and just run ‘rake test’. Rails does this automatically. RSpec comes with a similar Rake task that’s as easy to define.

If you really want your IDE to show you colors and stuff, I know RubyMine supports testing Rails applications and is cross-platform (written in Java).

Adam Stegman

Hi Adam,

Rake comes with great support for unit testing with Test::Unit out of the box, you don't need an IDE to hook it all up for you. You can define a Rake::TestTask and just run 'rake test'. Rails does this automatically. RSpec comes with a similar Rake task that's as easy to define. If you really want your IDE to show you colors and stuff, I know RubyMine supports testing Rails applications and is cross-platform (written in Java).

I'm a long-time user and fan of Test::Unit but TDD with it requires quite a bit of typing. What I saw demonstrated with VisualStudio was very impressive though. It supported Red-Green-Refactor at level I'd never seen before. Write the test, it knows you don't have the method you're testing and auto-generates it. That sort of thing. It was a very brief demo but what he showed was very impressive. I've never been a big fan of IDEs for Rails development. I use the Ruby version of NetBeans because it lets me use the same tool on Windows and Linux. That and the debugger. But it's got nothing like what I saw last weekend re: built-in TDD support. I'll check out RubyMine.

Thanks! Bill

Bill Walton wrote:

Hi Adam,

Rake comes with great support for unit testing with Test::Unit out of the box, you don't need an IDE to hook it all up for you. You can define a Rake::TestTask and just run 'rake test'. Rails does this automatically. RSpec comes with a similar Rake task that's as easy to define. If you really want your IDE to show you colors and stuff, I know RubyMine supports testing Rails applications and is cross-platform (written in Java).

I'm a long-time user and fan of Test::Unit but TDD with it requires quite a bit of typing. What I saw demonstrated with VisualStudio was very impressive though. It supported Red-Green-Refactor at level I'd never seen before. Write the test, it knows you don't have the method you're testing and auto-generates it.

Perhaps you want Autotest? Again, no IDE necessary.

(But I think method autogeneration in this case would be dangerous. Doesn't that mean you don't see the test fail?)

I know that RSpec and Cucumber support an HTML output format where you can see the red and green nicely displayed in your browser. I hate Test::Unit, so I haven't used it enough to be sure if it does the same thing, but it might.

That sort of thing. It was a very brief demo but what he showed was very impressive. I've never been a big fan of IDEs for Rails development. I use the Ruby version of NetBeans because it lets me use the same tool on Windows and Linux.

Er...so does any decent editor. KomodoEdit (my current favorite) exists for Windows, Linux, and Mac OS; so does jEdit.

That and the debugger.

Does ruby-debug-ide actually work with NetBeans? It didn't when I tried earlier this year.

But it's got nothing like what I saw last weekend re: built-in TDD support. I'll check out RubyMine.

Thanks! Bill

Best,

Hi Marnen,

Perhaps you want Autotest? Again, no IDE necessary.

(But I think method autogeneration in this case would be dangerous. Doesn't that mean you don't see the test fail?)

You do see the test fail. Then you 'tell' it to generate the method. Again, it was a very brief demo. I may schedule a follow-up with the guy to see more. The thing that was really impressive is that he didn't switch from one tool to another. The degree of integration of the test tool into the development tool was like nothing I'd ever seen before. But then I don't spend much time reviewing editors / IDEs. That's why I asked. And yes, NB supports ruby-debug-ide. Has for a couple of years. You have to have the gems installed and that can be a bit of a pain. I had to download the last, not the latest, version and install locally.

Best regards, Bill

Bill Walton wrote:

You do see the test fail. Then you 'tell' it to generate the method. Again, it was a very brief demo. I may schedule a follow-up with the guy to see more. The thing that was really impressive is that he didn't switch from one tool to another. The degree of integration of the test tool into the development tool was like nothing I'd ever seen before. But then I don't spend much time reviewing editors / IDEs. That's why I asked. And yes, NB supports ruby-debug-ide. Has for a couple of years. You have to have the gems installed and that can be a bit of a pain. I had to download the last, not the latest, version and install locally.

That might be cool if it doesn't limit your choice of testing framework. My guess would be that having something so integrated into the IDE likely locks to into whatever test framework the IDE vendor decided to use. But, if it's flexible enough to provide choice of framework then I could see it maybe saving a few keystrokes. Not that big of a deal to me though. I mean how hard is it really to type def my_method ... end. And then likely have to move the generated method so that I keep my class files organized as I like.

"If code generation is the answer, then it must have been a stupid question."