[rspec-users] require StepGroup problem

Ben Mabey ben at benmabey.com
Thu Aug 14 12:33:22 EDT 2008


Gaston Ramos wrote:
> El mié, 13 de ago de 2008, a las 07:11:49 -0600, Pat Maddox dijo:
>   
>> On Wed, Aug 13, 2008 at 12:18 PM, Gaston Ramos <ramos.gaston at gmail.com> wrote:
>>     
>>> Hi guys, I'm trying to run this story http://pastie.org/252361
>>>       
>> You need to fully-qualify the class name, which is Spec::Story::StepGroup.
>>
>> Although I'm not sure why you're defining the steps this way in the
>> first place.  I think you want to use steps_for to define them, and
>> with_steps_for to run them.
>>     
>
> Thanks! it worked, but now I'm having another problem:
>
> http://pastie.org/252951
>
> http://pastie.org/252953
>
> What's wrong?
>
>   

It looks like the runner can't find your steps.  Like Pat said, people 
typically use the steps_for construct for defining steps.  I reworked 
your story to illustrate the proper usage:

http://pastie.org/253015

This blog post talks about using 'rubyesque' stories:
http://www.continuousthinking.com/2008/3/5/trying-rspec-s-rubyesque-stories

Also, I created a rails app for a presentation 
(http://www.benmabey.com/2008/05/10/slides-and-code-from-my-bddrspec-presentation/) 
where I show the different ways of using the story runner (rubyesque and 
plain text).  If you are familiar with git you can download it and look 
at how I did both ways (I used tags to mark my commits.) To list the 
tags simply type ‘git tag’ and to checkout a tag into a new branch type 
‘git checkout -b tag_name tag_name’. The link:
http://www.benmabey.com/wp-content/uploads/2008/05/story_runner_demo.tar.gz  


Vi su blog.. si esta escribiendo los relatos en espansol hay un 'patch' 
que sorpete espaonol (pues, castellano :) )  para las palabras (Given => 
Dado, When => Cuando, etc..):
http://github.com/nando/rspec/commit/4ad3fbc3d78ccb39f2745b0f901828ed4a539ad2
Tambien, Aslak Hellesøy tiene un projecto que se llama "cucumber" que es 
un "rewrite of the story runner using treetop" que ya sorpete lenguaje 
differentes:
http://github.com/aslakhellesoy/cucumber/tree/master

No he hablado espanol hace mucho anos, espero que me entiende. :)

Hope that helps,
Ben

 







More information about the rspec-users mailing list