News for hackers. Stuff that matters.
Re:Why Nobody Should Use Rails by michas on Tuesday August 06, 2013 @04:47PM (#6169053)
RoR doesn't "encourage" unit testing, it forces you to write thousands of meaningless unit tests which just make up for the lack of strong type system. Unit tests should test code logic, not parameter types.
Re:Why Nobody Should Use Rails by huntedsnark on Tuesday August 06, 2013 @04:58PM (#6169126)
Perhaps I've just missed it in the past but where does Rails advocate testing parameter types? There are examples of testing model validations, but you would want to test that in a strongly typed language as well. I don't think I've ever run across a test for something like "this id should be an integer" in Rails, if that's what you mean.
Re:Why Nobody Should Use Rails by tjbiddle on Tuesday August 06, 2013 @07:50PM (#6169977)
Then don't write meaningless types. If you're needing to constantly test parameter types - Then you need to work harder on ensuring your input is the correct type before calling a method. It should subconsciously tell you to put more effort into knowing what you're working with.

Unit tests are meant to test behavior - When I do X, I want Y to happen.

Rspec is great for this - I did X, I should see A, B, and C get called - and if they return to me this value then my final result should be Z.

Re:Why Nobody Should Use Rails by aparadja on Tuesday August 06, 2013 @05:07PM (#6169173)
Has RoR really started forcing you to write unit tests? By the thousands?

I've written several RoR apps in the past where I didn't unit test at all. Perhaps I misunderstood you.

Re:Why Nobody Should Use Rails by drewinglis on Tuesday August 06, 2013 @04:58PM (#6169124)
There are gems like shoulda (https://github.com/thoughtbot/shoulda) that make it really easy to do the 'types and typos' kind of unit tests. The marginal time required for any given class is negligible.