ANN Cucumber 0.2.0


#1

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:


#2

2009/3/18 aslak hellesoy removed_email_address@domain.invalid:

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


#3

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:

http://en.dawanda.com/product/2413009-Cucumber-NonAllergic-Stud-Earrings-Polymer-Clay


Joseph W.
http://blog.josephwilk.net


#4

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


#5

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


#6

On Wed, Mar 18, 2009 at 4:13 PM, Joseph W. removed_email_address@domain.invalid 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:

http://en.dawanda.com/product/2413009-Cucumber-NonAllergic-Stud-Earrings-Polymer-Clay

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


#7

On Wed, Mar 18, 2009 at 4:08 PM, Emmanuel P.
removed_email_address@domain.invalidwrote:

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.


#8

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.


#9

2009/3/19 Emmanuel P. removed_email_address@domain.invalid

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


#10

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


#11

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


#12

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