Creating tables for Cucumber

At work, we are starting to use Multiline step arguments / Scenario outlines in our cucumber tests, but, if you’ve got a lot of data to write as a table, it’s a pain to write the table out by hand. So I whipped up a little ruby script that takes a CSV file and dumps a nicely formatted table of data, suitable for pasting into a cucumber feature.

Grab the CSV to Table converter. Put it in the current directory), and run ruby csv_to_table.rb <input.csv> and the converted table will be printed to the console.

11:32 PM on Monday, 26/10/2009

Say something!