ANN Cucumber 0.2.0

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!

Enjoy!

(As usual, wait an hour or two for the gem to rsync around the Rubyforge
mirror park)

(::slight_smile: Aslak (::slight_smile:

2009/3/18 aslak hellesoy [email protected]:

  • 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)

(::slight_smile: Aslak (::slight_smile:

What’s this, like a cucumber in each ear?

David C. wrote:

  • Ruby 1.9 support

What’s this, like a cucumber in each ear?

Cucumber earrings are clearly in this year :slight_smile:


Joseph W.

Full release notes are available at
http://github.com/aslakhellesoy/cucumber/blob/d0555e4ca8a133f020efefd5a755da04bde3f57d/History.txt

(::slight_smile: Aslak (::slight_smile:

wow! amazing how much the cukes have accomplished,

keep on the good work

cheers,
joaquin

Great! Is there section for the new hook on reporting? I used the old
reporting to customized some of our HTML reports and wonder if you
have the new hooks documented somewhere?

Also what is the rerun formatter?

Thanks

Emmanuel

On Wed, Mar 18, 2009 at 4:13 PM, Joseph W. [email protected] wrote:

  • tags
    With this release I expect the formatter API to remain fairly stable.

What’s this, like a cucumber in each ear?

Cucumber earrings are clearly in this year :slight_smile:

Stud Earrings - Etsy

I’ll consider those when I get my ears pierced, Joseph.

Until then - this is more me:

http://www.1stchoicecufflinks.com/ecommerce/Scripts/prodView2~idproduct~11689~Cool~Cucumber~Cufflinks.htm

Aslak

On Wed, Mar 18, 2009 at 4:08 PM, Emmanuel P.
[email protected]wrote:

Great! Is there section for the new hook on reporting? I used the old
reporting to customized some of our HTML reports and wonder if you have the
new hooks documented somewhere?

The public API for formatters is all the methods in
Cucumber::Ast::Visitor.
Override as you see fit.
I have updated
http://wiki.github.com/aslakhellesoy/cucumber/custom-formatters to
reflect
the changes in 0.2.

Also what is the rerun formatter?

A formatter that prints the location of all failed scenarios. Used by
Cucumber’s Autotest plugin.

On Mar 18, 2009, at 11:22 PM, aslak hellesoy wrote:

I have updated http://wiki.github.com/aslakhellesoy/cucumber/custom-formatters
to reflect the changes in 0.2.

Thanks ! I started to digg last night into it. Saw one thing wrong in
the HTML reported where the Span gets escaped :wink:

Really like the refactoring you did by the way. Much cleaner than
before .

Emmanuel

Also what is the rerun formatter?

A formatter that prints the location of all failed scenarios. Used
by Cucumber’s Autotest plugin.

2009/3/19 Emmanuel P. [email protected]

Yep I have noticed that too - would be great if you could figure out how
to
not have it escaped!

Really like the refactoring you did by the way. Much cleaner than before .

Thanks that’s encouraging to hear :slight_smile:

Aslak

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 :wink:

Yep I have noticed that too - would be great if you could figure out
how to not have it escaped!

Working on it and actually an even better looking template :slight_smile: should
be done soon :slight_smile:

Emmanuel

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 :wink:

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 :slight_smile:

Emmanuel

On 18 Mar 2009, at 19:16, aslak hellesoy wrote:

I’m happy to announce the release of Cucumber 0.2.0.

Thanks! I just can’t exaggerate how much of a difference Cucumber
(and RSpec) makes to me.


http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran

http://twitter.com/ashleymoran