Forum: Ruby on Rails Help me about Test-Unit in Ruby on Rails

Posted by haxuan lac (haxuanlac)
on 2013-03-13 08:02
I'm using RubyMine for developing RoR and i found in RubyMine have Test
file.But I read in rubyforge http://test-unit.rubyforge.org/ have
Test-Unit for RoR.Could you help me about 2 problem:
- how is different between RubyMine Test-Unit and Test-Unit in rubyforge
- how can i run Test-Unit with Test-Unit in rubyforge(test-unit github:
https://github.com/test-unit/test-unit.git)
Thanks........
Posted by Robert Walker (robert4723)
on 2013-03-15 23:55
haxuan lac wrote in post #1101341:
> I'm using RubyMine for developing RoR and i found in RubyMine have Test
> file.But I read in rubyforge http://test-unit.rubyforge.org/ have
> Test-Unit for RoR.Could you help me about 2 problem:
> - how is different between RubyMine Test-Unit and Test-Unit in rubyforge
> - how can i run Test-Unit with Test-Unit in rubyforge(test-unit github:
> https://github.com/test-unit/test-unit.git)
> Thanks........

If you're planning to do xUnit style testing then I would recommend 
using Ruby 1.9's build-in test framework called MiniTest:

http://www.bootspring.com/2010/09/22/minitest-ruby...

You can even opt for RSpec style BDD testing as described (pun intended) 
toward the end of the above blog.

Alternatively you may also choose the excellent, and very popular, RSpec 
for comprehensive BDD style testing:

https://github.com/rspec/rspec-rails
Posted by haxuan lac (haxuanlac)
on 2013-03-16 03:12
Thank Robert Walker for answer me
I'm want to do with TDD style(http://www.agiledata.org/essays/tdd.html)
Could you give me some advise.Thanks...
Posted by Colin Law (Guest)
on 2013-03-16 10:18
(Received via mailing list)
On 16 March 2013 02:12, haxuan lac <lists@ruby-forum.com> wrote:
> Thank Robert Walker for answer me
> I'm want to do with TDD style(http://www.agiledata.org/essays/tdd.html)
> Could you give me some advise.Thanks...

Start by working through the tutorial railstutorial.org (which is free
to use online).  That gives a good introduction to testing.

Colin
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.