[rspec-users] cucumber custom formatters
aslak.hellesoy at gmail.com
Fri Dec 12 19:42:35 EST 2008
On Sat, Dec 13, 2008 at 1:37 AM, Emmanuel Pinault <seatmanu at gmail.com>wrote:
> OK, I think I figured out the problem.
> I had the following
> module Cucumber
> module Formatters
> class MyFormatter
> As soon I as removed it from that module, then it started to work. I
> am not seeing different call and steps in the visitor printing ...
> maybe a nice simple example of create a formatter would have helped
Did you try -f Cucumber::Formatters::MyFormatter ?
That should have worked.
> On Fri, Dec 12, 2008 at 4:22 PM, Emmanuel Pinault <seatmanu at gmail.com>
> > Is the explanation of --format not clear? Have you tried:
> > cucumber -r my_formatter -f MyFormatter mytest.feature
> > Yes, I tried that too and it is not working still. I started to digg in
> > cli.rb and clearly there is a registration process happening in the
> > build_formatter_broadcaster.
> > But somehow it is not finding my formatter .. trying to debug it more
> >> also, is there a place to understand all the available hooks and order
> >> they are called? Looking at the html, pretty and progress , I can see a
> >> of available hooks with some that requires to call an accept method...
> > What do you mean by hooks? This?
> > http://github.com/aslakhellesoy/cucumber/wikis/hooks
> > Sorry I should have been more clear about the hooks.. I meant the
> > hooks. I see the main one used in the pretty_formatter and that are
> > by the executor. But It seems in the html_formatter that you are even
> > some other hook (likely those are called during the tree parsing ... just
> > guess) but cannot see all the one that are available and when. I am
> > writing formatter to understand the order of calls.
> > #accept is part of the internal API to traverse the internal structure of
> > features. It's using the visitor pattern. Are you familiar with that?
> > Yes I am and notice you use that pattern but I am not familiar with
> > treetop. But seems a bit complicated for a custom reporter to have to
> > with that. the HTML Report clearly will break without those calls at the
> > right place...
> > so a simple diagram would hel understanding how calls are made. Once I am
> > able to rrun that custom report, I can try to make one and send it to you
> > add to the wiki
> > Thanks
> > Emmannuel
> > Aslak
> >> Any ideas?
> >> Thanks
> >> Emmanuel
> >> _______________________________________________
> >> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users