[rspec-users] Story runner rake task

Ben Mabey ben at benmabey.com
Wed Dec 19 20:07:10 EST 2007


Ben Mabey wrote:
> James Deville wrote:
>   
>> What's the status on a rake task for the story runner. If nothing is  
>> in progress, where could I start to try and build one?
>>
>> JD
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>   
>>     
>
> If you check out rspec trunk you can see that they have created one for 
> the rspec project.  It just runs the all.rb file in the stories directory.
>
> -Ben
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>   
This is the actual task they are using:

desc "Run all stories"
task :stories do
  html = 'story_server/prototype/rspec_stories.html'
  ruby "stories/all.rb --colour --format plain --format html:#{html}"
  unless IO.read(html) =~ /<span class="param">/m
    raise 'highlighted parameters are broken in story HTML'
  end
end


More information about the rspec-users mailing list