views:

49

answers:

1

I am working on a Rails app that allows you to create a configuration and then launch a server at EC2 with this configuration. So far I've been using cucumber for BDD and was very happy with that. However, now I want to pick a configuration and actually launch the server. Due to cost and performance issues I don't want to actually launch a server every time I am running the cucumber features.

Are there any best practices for cases like this? I would like to keep the BDD up, but also don't want to spend too much time on working on an elaborate solution just to have feature descriptions for this. On the other hand I will have the same problems, when I will have to write Unit test for this.

+1  A: 

When working on a rails app that required twitter integration, I found fakeweb to be extremely helpful. I've used it in conjunction with cucumber successfully.

I found that to support the BDD outside-in development style, I set fakeweb to disallow all web traffic and then added my faked-out web calls one at a time, as my tests failed. It seemed to fit right in with my BDD workflow.

Drew Olson
Funny enough I had the same problem a few months ago with Twitter as well, but didn't ask back then. Fakeweb seems to be fantastic. Thank you so much!
ajmurmann