5 ms·
DHH Offended By RSpec, Says Test::Unit Is Just Great
- deleted 16y ago[deleted]
- cageface 16y agoI get by just fine with Test::Unit too. RSpec smelled like gratuitous complexity from the get-go. Wasn't the whole point of Rails to get back to doing things simply?
- jacques_chester 16y agoI'm ambivalent about RSpec, but the concept of a structured requirements language (which is front-end of Cucumber) is a good one. Cucumber grew out of testing; it'd be interesting to see the problem approached from the other end. Suppose you were designing a language, ab initio, for sharing requirements with end-users. What would it look like? I've seen Steve McConnell mention "Planguage" by Tom Gilb, but online resources are scarce.
- cageface 16y agoI have never, personally, worked with a client that was willing to work consistently at the level of detail that Cucumber provides. I suppose if I had such a client I might find it useful. For communicating requirements among developers I think plain Ruby is already readable enough.
- jacques_chester 16y agoWhat level of detail do you use with clients?
- cageface 16y agoWireframes for UI, informally written use cases for features. I try to get working prototypes up on screen as quickly as possible.
- sunkencity 16y agoBest thing about cucumber is the possibility to set up a matrix of conditions and run through the scenarios that way - can be used as a poor mans quickcheck. https://github.com/aslakhellesoy/cucumber/wiki/scenario-outlines https://github.com/aslakhellesoy/cucumber/wiki/scenario-outl...
- jacques_chester 16y agoI spent about 6 months working at a Rails shop. The best thing about the Rails community is the speed at which great new tools appear. The worst thing about the Rails community is the speed at which great new tools are abandoned.
- Semiapies 16y agoFlagged for Twitter drama.
- msbarnett 16y agoDownvoted for non-contributive noise. For future reference: http://ycombinator.com/newsguidelines.html http://ycombinator.com/newsguidelines.html Please don't submit comments complaining that a submission is inappropriate for the site. If you think something is spam or offtopic, flag it by going to its page and clicking on the "flag" link. (Not all users will see this; there is a karma threshold.) If you flag something, please don't also comment that you did.
- petercooper 16y agoIt's a debate about the merits of two different testing libraries. DHH is pretty clear in his suggestions and opinions - it's not just pointless sniping.
- BvS 16y agoDHH noted that this gist comparing some Test::Unit tests to RSpec triggered his statements: https://gist.github.com/893027 https://gist.github.com/893027
- ekidd 16y agoWhile DHH has remarkably good taste—and he has, in fact, helped make code more beautiful throughout our industry—his taste is not necessarily perfect. Exhibit A: Rails fixtures. When using fixtures, you end share a single set of objects between all your tests. And sooner or later, your tests will become tightly coupled via the fixtures: To add a new test, you must add some new records. But when you add those records, some other tests break. If you instead use an object factory like machinist or factory_girl, you can create objects at the start of each test, and fill in random values for any fields you don't care about. This makes each test independent of the others, and it keeps the code and data in one place. So if we admit that DHH's taste in testing is potentially imperfect, what does that mean for the Test::Unit versus RSpec debate? Not much. Some people like Test::Unit. It's a fine library. I prefer RSpec, because it's a better match to how I think. And many of the testing libraries I want to use are actually work better with RSpec. Oh, and if Cucumber is a bad match for your project, try Steak. It's easier to set up, and you write ordinary Ruby code.
- ludicast 16y agoI'm an RSpec user, but do feel that Ruby is self-documenting enough that it can be used as is.