[rspec-users] Multi-line steps

Ashley Moran ashley.moran at patchspace.co.uk
Wed Apr 9 16:49:11 EDT 2008

On 9 Apr 2008, at 11:31, Tim Haines wrote:

> Hi Ashley,
> What's your use case?  I'm curious...
> Tim.

Hi Tim

I've finally started writing a tool I've wanted for ages: a REAL  
database migration system, that works on a patch system with  
dependency tracking (like darcs), not a borked^H^H^H^H^H^H linear  
scheme like AR Migrations.  So I started writing the story and I  
wanted to write something this:

   Scenario: two steps depend on third
     Given a file "db/migrate/a.migrate.rb":
       migration "migration A" do |m|
         m.depends_on "migration X"
     And a file "db/migrate/b.migrate.rb":
       migration "migration B" do
         m.depends_on "migration X"
     And a file "db/migrate/x.migrate.rb":
       migration "migration X" do

     When ...

In the end I did it like the way Rick's mate Fred builds CSVs, but  
breaking down a single step can be cumbersome.



More information about the rspec-users mailing list