I use RSpec in all my projects. It’s really hard to overemphasize how helpful it is and how much easier becomes your life if you have good specs coverage. But its outstanding flexibility enables many ways to make your specs awful: horribly slow, over-bloated, even non-readable sometimes. I do not want to teach you BDD and RSpec here, but instead I will give you some ideas how to improve your specs quality and increase efficiency of your BDD workflow.
(Link: My top 7 RSpec best practices | Dmytro Shteflyuk’s Home)
Uncategorized
bdd, rspec, tdd
With Rspec and Cucumber, Ruby has brought testing to a whole new level, but tests still require a lot of work.
But things just got better. Llewellyn Falco will show you new patterns and practices to dramatically decrease the amount of effort needed to test.
(Link: SD Ruby – Episode 066: Unit Testing: The Easy Way)
Uncategorized
ruby, tdd, unittesting
Textmate Bundle for Webrat Just a simple collection of snippets. The snippets are intended to be used by people using the RSPec Story bundle and/or the Cucumber bundle.
(Link: Textmate Bundle for Webrat)
Uncategorized
rubyonrails, tdd, webrat
This is a fork of the rspec-story-tmbundle.
The goal is to keep the same functionality that the original bundle had but make it compatible with Cucumber and also take advantage of the benefits that Cucumber offers.
So far the basic file switching and syntax highlighting is working. You can also run a feature. (See below.)
File creation and more advanced step generation commands have not yet been ported fully. Feel free to help out. :)
If you are doing ruby development with webrat you may also want the webrat bundle.
(Link: Textmate Bundle for Cucumber)
Uncategorized
cucumber, tdd, textmate
p> We have recently decided to use BDD for our upcoming projects. To make testing more fun and efficient I have hook up Growl with ZenTest’s autotest to display test results from Rspec. Some of the following instructions is taken from http://wincent.com/knowledge-base/Setting_up_autotest_to_use_Growl
What follows are the instructions to install the software to setup your own if you like to try out.
(Link: Setting up Rspec, Autotest and Growl on Mac OS X)
Uncategorized
bdd, growl, rspec, tdd
Dave Astels – A New Look at Test-Driven Development
(Link: BDD Intro – Powered by Google Docs)
Uncategorized
bdd, tdd
I put out calls for ‘Cucumber Best Practices’ and received an assortment of responses—thanks to everyone who contributed! After collecting and reviewing all the responses, I’ve come up with a list of 15 expert tips you want to keep in mind when working with Cucumber.
(Link: 15 Expert Tips for Using Cucumber | Engine Yard Blog)
Uncategorized
cucumber, rubyonrails, tdd
Sin and Penitence · People introducing TDD do this thing where they start from scratch saying “We’re going to write a class to do X and it’ll need a method to do Y, so let’s write a test for Y”. The problem is, when I’m getting started, I never know what X and Y are. I always end up sketching in a few classes and then tearing them up and re-sketching, and after a few iterations I’m starting to have a feeling for X and Y. ¶
And maybe the sketch-and-tear process would be better and more productive if I had the patience to write the tests for each successive hypothesis about X and Y, but I don’t think I ever will. This is partly because the first few tests for the kind of classes I write tend to be expensive; where you have to face the dependency-injection and big-fat-mock problems. I lack the patience to make that investment if I’m unsure the class is basically pointing in the right direction.
(Link: Test-Driven Heresy – lapses from the TDD are more forgivable the closer you are to the beginning of a project – Tim Bray)
Uncategorized
programming, tdd, tweet
Recently, Dave Nicolette consolidated a list of recommended TDD tutorials from a discussion on the Extreme Programming group. Here is a sneak peak at the consolidated list with categorization for quickly getting started with Test Driven Development.
(Link: InfoQ: Recommended TDD Tutorials)
Uncategorized
bdd, tdd
The Cucumber project describes itself as a suite that, “lets software development teams describe how software should behave in plain text. The text is written in a business-readable domain-specific language and serves as documentation, automated tests and development-aid – all rolled into one format.“
(Link: Robby on Rails : 20 articles on Cucumber and a free beverage recipe!)
Uncategorized
cucumber, ruby, tdd
This project has already reached the first goal, which was to port all Shoulda macros to RSpec. This has been done with great care and attention to detail, and I have tried to write lots of tests. But there is no substitute for using it in real life and finding areas that could use improvement.
(Link: Shoulda for RSpec is Remarkable!)
Uncategorized
remarkable, rspec, ruby, tdd
One interesting use of Cucumber is to facilitate integration and communication between different systems. At my last job we had several distributed systems that communicated via a messaging broker. It was very important that the messages sent between the different systems be kept in sync and handled appropriately. For example, System A needed to know the exact message format and queue that System B was going to be using, and vice versa. This type of integration between systems is very error prone and when something goes awry the problems can be very hard to track down. In order to ensure both systems were on the same page we used the exact same Cucumber feature in both systems but had the step definitions verify different things on the respective systems. In this post I’ll walk through a quick example illustrating the tools and techniques we used to do this.
(Link: Using Cucumber to Integrate Distributed Systems and Test Messaging)
Uncategorized
activemq, bdd, cucumber, messaging, rspec, ruby, tdd
RSpec, Cucumber, Webrat, RCov and Autotest are a powerful combination of tools for testing your Rails app. Unfortunately getting them to all work nicely together can be a bit of challenge. I recently configured a development environment from scratch on OS X 10.5 Leopard and kept track of all of the little details. (via claytonlz.com)
(Link: How To Setup RSpec, Cucumber, Webrat, RCov and Autotest on Leopard)
Uncategorized
cucumber, osx, rspec, rubyonrails, tdd, webrat