codeforamerica / follow-all

Follow all the members of a Twitter list with a single click
http://follow-all.herokuapp.com/
BSD 3-Clause "New" or "Revised" License
81 stars 31 forks source link

RSpec #11

Open lovehandle opened 11 years ago

lovehandle commented 11 years ago

This could just be a matter of preference, but is there any opposition to using RSpec to test this app (as opposed to Test::Unit)? I'm open to using Test::Unit, but I find RSpec's syntax a little cleaner. @sferik what was the design decision behind the testing framework? Do you prefer Test::Unit? I'll defer to you. Obviously, changing the framework for a single contributor wouldn't be justified.

sferik commented 11 years ago

To be honest, I'm mostly indifferent between Test::Unit/MiniTest::Unit and RSpec. I work on a bunch of projects that use RSpec and other projects that use Test::Unit (as well as a few projects that try to bridge the gap with shoulda), so I'm comfortable switching back and forth between them. The same basic functionality exists in both libraries, so it's largely a question of syntax/stylistic preference. That said, there are some useful features found only in RSpec (e.g. the fail-fast and profile flags).

Test::Unit has always been the default for Rails, which is why I decided to use it here. In the gems I create from scratch–where there is no default–I typically go with RSpec. If I was forced to pick one for all my projects, I'd probably choose RSpec but, again, I'm mostly indifferent. (I prefer to reserve my strong opinions for more important questions.)

If you're planning on test-driving a bunch of new features and would prefer to use RSpec, you have my blessing.