I could go into great detail… but I’m beat. Creating the dev environment from the ground up was a lot of work. I also needed to get some project details under way.
Here is what I needed to get Features and Specs to load up the library properly
Create a cucumber.yml. This is necessary to set the default profile, which I wanted to get a little more pretty printing during the cucumber command.
In a step definition (grid_steps.rb), I needed the $LOAD_PATH to point to the lib, so I added the following to the top of support/env.rb
$:.unshift File.expand_path(File.dirname(__FILE__) + "/../../lib")
Also support RSpec expectations/matchers within the steps, so
require 'spec/expectations'
Update the $LOAD_PATH here from a different location in the tree than features, from ./spec
$:.unshift File.expand_path(File.dirname(__FILE__) + "/../lib")
In order to get cucumber integrated with autotest, add this to cucumber.yml
autotest: --format pretty features autotest-all: --format pretty features
Also autospec requires an environment switch, which I have added to ./bashrc for convenience
export AUTOFEATURE=true
With all the prettyness set up with cucumber and RSpec, we now have a new color in the Red-Green cycle.
Cucumber Features’ Given/When/Then lines are displayed in Amber until each is properly trapped by a defined Given/When/Then in a steps definition file (./features/step_definitions/*.rb).
RSpec specs are displayed in amber if the spec is not defined (name only) like this
it "this spec is not defined yet"
Well, that’s about all I can handle for now.
I will make an attempt to trap the Amber-Red-Green cycle in git commits during my work tomorrow.
Here’s the entirement development environment for TicTacToe. This was actually rebuilt for this project as I deleted my last dev environment (A VirtualBox instance) during a system-repair process (wipe-drive-reinstall of Vista
This week I am starting a Tic Tac Toe Kata in response to a programming exercise by a future employer. (Wave to you!)
Here are my rules for performance of the kata:
And here is the kata:
What we have in mind is a simple Tic-Tac-Toe program.
At the least this program should:
We would like you to use Ruby as the programming language. (My Pleasure!)
So, in my next posting I’ll be into project setup, prerequisites, and the first story or two.
Update 3/17/09: Add RDoc to expected deliverables.