rspec or shoulda?

Which do you prefer for writing tests?

Hi, Mauro.
I've been using rSpec with Cucumber, and have just scratched
shoulda...

My feeling is that it really depends on how comfortable you are with
each one when you read your tests. Read them allowed.
Functionality and syntax are equivalent.

Regards,
jb

Agreed…

I’m beginning with Rspec plus Cucumber, but When I was looking for info I found both pretty good, it depends on witch one you are most comfortable with.

Do you use also autotest?

I just love shoulda. It is such a step up from plain tests. It allows
me to write more readable tests without having to have
damn_stupid_test_names_that_try_and_explain_everything.

The selling point is the context do ... end and the fact that you can
have setup do ... end nested at various levels. Without this I would
either have to have hundreds of smaller test files (where does this
new test go?) or unreadable test files where the test names signify
nothing.

Shoulda is great. I use it for all my tests along with factory_girl,
faker, and flexmock.

And then I have autotest running in the background.

With spork and autotest-notification?

I use rspec with shoulda, since shoulda now supports ( and will only support) rspec’s syntax, the context framework is going to be taken out and will not be updated so at the end it will all look like rspec matchers.

I use

group :test do

gem 'rspec', '>=2.0.0'

gem 'rspec-rails', '>=2.0.0'

gem 'shoulda'

gem "factory_girl_rails"

gem 'cucumber', ">=0.6.3"

gem 'cucumber-rails', ">=0.3.2"

gem 'capybara', ">=0.3.6"

gem 'database_cleaner', ">=0.5.0"

gem 'spork', ">=0.8.4"

gem 'launchy'

gem "pickle", ">=0.4.2"

gem "selenium-webdriver"

end

and

Faker

autotest-fsevent (0.2.4)

autotest-growl (0.2.9)

Here is what a read about shoulda

http://robots.thoughtbot.com/post/701863189/shoulda-rails3-and-beyond

You use cucumber, what about steak?