[rspec-users] Testing .Net Newbie

John Polling lists at ruby-forum.com
Thu Jan 14 06:46:19 EST 2010


I've been a .Net developer for a number of years now and I'm a big fan
of TDD / BDD.  I have been following these principles for a couple of
years and use tools such as NUnit for testing purposes.

I am now looking at moving across to using RoR for a number of projects
and I'm still getting my head around how everything works.  I've been
reading up on RSpec and Cucumber and I have one question looming in my
head.  (This may be my .Net head messing things up for me).

Normally in .Net when TDDing a controller class I would mock out other
library classes that the controller calls, such as Repository layer
classes.  However I notice when using Cucumber people _very_ rarely mock
anything and I'm assuming this is because Cucumber is meant for testing
the full stack (Integration testing).  I'd normally do this with
something like Selenium in .Net.

My question is, when creating a controller (or other class) that relies
on other library classes is it best to just use RSpec rather than
Cucumber to mock out the other dependencies and then bring in Cucumber
scenarios later when you know your RSpec tests are passing?


Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list