[rspec-users] ANN Cucumber 0.2.0

Emmanuel Pinault seatmanu at gmail.com
Thu Mar 19 14:13:06 EDT 2009


On Mar 19, 2009, at 9:59 AM, aslak hellesoy wrote
>
> Thanks ! I started to digg last night into it. Saw one thing wrong  
> in the HTML reported where the Span gets escaped ;)
>
> Yep I have noticed that too - would be great if you could figure out  
> how to not have it escaped!

Not sure it is the best way but it works:

       def visit_step_name(keyword, step_match, status, source_indent,  
background)
         #step_name is not exposed for some reason... maybe it should?  
That would simplify it even more
         step_name = step_match.format_args(lambda{|param| "#{param}"})

         step_parts = step_match.step_name.split(/ 
#{step_match.args.join("|")}/)

         @builder.li(:class => status) do
           @builder.text!("#{keyword}")
            step_parts.each_with_index do |part, index|
              @builder.text!("#{part}")
              @builder.span("#{step_match.args[index]}") if  
step_match.args[index]
            end
         end
       end

Few comments :

1) Maybe you could expose step_name are read only? I added the  
following in the formatter file on top as it would simplify the first  
line in visit_step_name

module Cucumber
    class Step
      attr_reader :step_name
    end
end

2 ) Also, I notice that now it is harder to attached a table to step  
(maybe it is due to the changes on how table can be used ...) and  
error as well. So I cannot easily add the error in the li than the  
step as the sequential logic in Step#accept won t allow it..  Not a  
bit deal it was nice to be able to have the error as part of the same LI

I can send you the final change I made to my template (That will look  
like close to Rspec in a way)  if you are interested in. Would be  
better than the default for now :)

Emmanuel
	
>
>
>
> Really like the refactoring you did by the  way. Much cleaner than  
> before .
>
>
> Thanks that's encouraging to hear :-)
>
> Aslak
>
>
> Emmanuel
>
>>
>>
>>
>> Also what is the rerun formatter?
>>
>> A formatter that prints the location of all failed scenarios. Used  
>> by Cucumber's Autotest plugin.
>
>
>>
>>
>>
>> Thanks
>>
>> Emmanuel
>>
>>
>> On Mar 18, 2009, at 12:21 PM, David Chelimsky wrote:
>>
>> 2009/3/18 aslak hellesoy <aslak.hellesoy at gmail.com>:
>> I'm happy to announce the release of Cucumber 0.2.0.
>>
>> There are a some really exciting new features in this release. Some  
>> of the
>> ones I find most valuable are:
>> * tags
>> * better output
>> * autoformatting of features
>> * better i18n
>> * Ruby 1.9 support
>> * background
>> * guess mode
>>
>> Full release notes are available at
>> http://github.com/aslakhellesoy/cucumber/blob/d0555e4ca8a133f020efefd5a755da04bde3f57d/History.txt
>> With this release I expect the formatter API to remain fairly  
>> stable. Check
>> out the Cucumber::Ast::Visitor class for the full API.
>>
>> Thanks a lot to everyone who has contributed so far. The big internal
>> refactoring has now stabilised, so it should be easier to  
>> contribute again!
>>
>> Congrats!!!!!!!
>>
>>
>> Enjoy!
>>
>> (As usual, wait an hour or two for the gem to rsync around the  
>> Rubyforge
>> mirror park)
>>
>> (::) Aslak (::)
>>
>> What's this, like a cucumber in each ear?
>>
>>
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>>
>>
>> -- 
>> Aslak (::)
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
>
>
> -- 
> Aslak (::)
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090319/5e5d98ef/attachment.html>


More information about the rspec-users mailing list