News for hackers. Stuff that matters.
Re:Learn how to test Rails using Test::Unit instead of Rspec by tamersalama on Thursday March 21, 2013 @06:19PM (#5419607)
"because Test Unit documentation is terrible"

Are you confusing Test Unit documentation with 'How/What to test' documentation? I can't think of any documentation required if what you use is a group of asserts.

Test::Unit in a nutshell: `test "should do something"; ...; end` is what gets run in each of the files. `setup` is called before each test. `teardown` is called after each test. use `assert_*` at your discretion.

Re:Learn how to test Rails using Test::Unit instead of Rspec by rhizome on Thursday March 21, 2013 @06:27PM (#5419645)
You know, recently I had reason to look into the teardown method (DatabaseCleaner, dontchaknow), and I never did find anything conclusive that it was something that test-unit used. Sure, it was mentioned in many many DatabaseCleaner questions/answers/threads, but nothing I could really rely on since invariably these were also using Rspec. That is, my unanswered question was "Is teardown solely an Rspec thing?"
Re:Learn how to test Rails using Test::Unit instead of Rspec by gyardley on Thursday March 21, 2013 @10:11PM (#5420938)
Setup and teardown are in the Rails testing guide.

http://guides.rubyonrails.org/testing.html#setup-and-teardow...

Re:Learn how to test Rails using Test::Unit instead of Rspec by rhizome on Friday March 22, 2013 @04:07PM (#5425325)
I suppose so, but the readability of the guides are an (perhaps-idiosyncratic) issue for me.