Si lo llega a hacer premeditadamente seguro que no le sale. El pasado jueves día 7, coincidiendo con el día en el que cumplía mis treinta y cinco agostos, Aslak mandaba el siguiente correo a la lista de desarrollo de RSpec:

[ANN] Cucumber

Nice vegetable, nice tool.

It's my reimplementation of the story runner, addressing several
shortcomings of the current one. And I'm calling them features instead
of stories now, because that is what they are.

http://github.com/aslakhellesoy/cucumber/ (The home page)
http://gojko.net/2008/08/06/cucumber-next-generation-ruby-bdd-tool/
(Thanks Gojko)

Take a look - it's taking shape.

Aslak

Una de la principales virtudes del Cucumber de Aslak frente al Story Runner de RSpec es la posibilidad de escribir las "plain text stories" en cualquier idioma.

Lo cachondo del asunto es que Aslak tiene asignada la implementación de dicha funcionalidad dentro de RSpec desde que la solicité a primeros de año junto con el parche para la versión de aquel momento y, como no, su "plain text story" asociada:


 Story: Writting stories in other languages
 
   As a non-english RSpec developer
   I want to write stories in my mother tongue
   So that I don't have to make an extra effort to know what's going on
 
   Scenario: Pending
     Given the file stories/plain_text_story_in_spanish.rb
     When I run it with the ruby interpreter
     Then the exit code should be 0
     And the stdout should match /1 scenarios: 0 succeeded, 0 failed, 1 pending/m
     And the stdout should match /4\) La portada de Mi Sitio en La Red/
 
   Scenario: Succeed
     Given the file stories/plain_text_story_in_spanish_with_steps.rb
     When I run it with the ruby interpreter
     Then the exit code should be 0
     And the stdout should match /1 scenarios: 1 succeeded, 0 failed, 0 pending/m
 

Era muy excitante ver como la versión sin el parche fallaba al ejecutarla y la parcheada campaba triunfal. Adiós TODO ambiguo. Hola Spec-ificación formal.

Sin embargo la realidad es que ha llovido bastante desde aquello, y viendo que seguramente Aslak escribirá sus historias en noruego utilizando Cucumber, me da la sensación de que seguirá lloviendo durante mucho más hasta que dicha posibilidad exista en la versión oficial de RSpec.

Espero probar Cucumber pronto, pero mientras tanto no me queda más remedio que mantener el legado que tenemos actualmente utilizando el Story Runner de RSpec. Para ello me he creado una rama de RSpec y le he metido los cambios para el soporte multilenguaje.

En cualquier caso lo que está claro es que Aslak ha resuelto mi deseo y me lo ha presentado justo el día de mi cumple... Takk så mye!

blog.aslakhellesoy.com