I have a separate environment for running Cucumber features, called (unsurprisingly), features. That means I have three useful environments locally: development, test and features. More on this later.
On Friday I got really caught out, trying to run Cucumber against a features environment that was out of date. Now it was my mistake for not looking at the console more clearly, but it shouldn't be a mental overhead to remember to what state each database is in (especially with 3!). So, on the basis that there are only three numbers (0, 1 and n), I generalised the problem with these rake tasks, which I currently have sitting in Merb.root/lib/tasks/database.rake.
And, yes, process_environments is ugly, but it's partly down to making sure the development environment always appears in the list (instead of rake), and partly down to wanting each database migrated exactly once.
I have no idea how this will work with multiple DataMapper repositories, sorry.
Read the rest of this entryAdventures in MerBDDland 1: RSpec TMBundle
October 24th, 2008
I'm switching to Merb for web development, Rails having tried my patience once too often. I still have a lot of appreciation for Rails, for the push it's given Ruby, and for showing the world that web programming doesn't need several months of learning framework code to build Hello World. But Rails is failing to keep up with demands for faster, cleaner, code, and DHH's attitude does not help matters. (Although, if you are still trying to code on Windows, GET YOUR ACT TOGETHER!) But this is a discussion in its own.
My focus is applying BDD techniques to Merb, using RSpec and Cucumber, with Celerity to drive the full app in development. This series will be my experiences of doing BDD with Merb, so it will be published sporadically, and its content will be fairly random. I already have some content to write up, but in the mean time I'm starting with an easy one I found this morning - as more of an excuse to announce the series.
I should also say that I'm simultaneously working through two Merb projects: one on my own, and one with a client. And a piece of freelance development I'm doing will also have a small embedded web app some time in the (hopefully near) future. So I hope to generate a lot of useful real-world experiences and work out the teething troubles.
UPDATED: you no longer need to do this, the change has been applied to the RSpec TMBundle repo
Read the rest of this entryWeb app BDD thoughts as I move to Merb
October 20th, 2008
This post is repost of a message I sent to the Merb mailing list. The answers to my question prompted me to compose a long reply that sums up how I currently feel about BDD in a web apps. I thought I'd reproduce it here, slightly edited to add context missing when you take it out of the Merb list). Full content in the body of the article...
Read the rest of this entry