Alberto Perdomo
2008-Nov-25 12:23 UTC
[rspec-users] Cucumber Problems with setup selenium/webrat + languages
Hi all, i''ve gotten started with cucumber thanks to Fernando and Raimond who gave a brilliant talk about cucumber at the Conferencia Rails in Madrid a few weeks ago. Congratulations again guys! Thanks also to Joseph Wilk who helped me out on IRC getting selenium up and running! Well, since then i got started using cucumber, first with webrat and then i tried it out with selenium. Now i am trying to have a parallel setup like this: features/features_plain/*.features features/features_plain/step_definitions/*.rb features/features_plain/support/env.rb (require webrat here) features/features_with_ajax/*.features features/features_with_ajax/step_definitions/*.rb features/features_with_ajax/support/env.rb (require selenium here) My profiles look like this: webrat: --language es features/features_plain selenium: --language es features/features_with_ajax So now it almost seems to work. My problem is the spanish keywords are recognized inside the features but not inside the steps. So if i change "Cuando" for "When" inside a step then it works, etc. Obviously my target is to write the features and step_definitions in the same language, consistently throughout a project, depending on the language spoken by the client. Also, i am looking into a way of sharing common step_definitions, maybe inside a folder features/common_step_definitions and maybe require it in both profiles? Any hints and suggestions very appreciated! Cucumber is awesome! Keep rocking! Alberto.
aslak hellesoy
2008-Nov-25 12:46 UTC
[rspec-users] Cucumber Problems with setup selenium/webrat + languages
On Tue, Nov 25, 2008 at 1:23 PM, Alberto Perdomo <alberto.perdomo at aentos.es>wrote:> Hi all, > > i''ve gotten started with cucumber thanks to Fernando and Raimond who > gave a brilliant talk about cucumber at the Conferencia Rails in > Madrid a few weeks ago. Congratulations again guys! > > Thanks also to Joseph Wilk who helped me out on IRC getting selenium > up and running! > > Well, since then i got started using cucumber, first with webrat and > then i tried it out with selenium. Now i am trying to have a parallel > setup like this: > > features/features_plain/*.features > features/features_plain/step_definitions/*.rb > features/features_plain/support/env.rb (require webrat here) > > features/features_with_ajax/*.features > features/features_with_ajax/step_definitions/*.rb > features/features_with_ajax/support/env.rb (require selenium here) > > My profiles look like this: > webrat: --language es features/features_plain > selenium: --language es features/features_with_ajax > > So now it almost seems to work. My problem is the spanish keywords are > recognized inside the features but not inside the steps. So if i > change "Cuando" for "When" inside a step then it works, etc. >Currently you have to alias the 4-5 methods yourself. I recommend doing that in your env.rb file - and make sure the stepd_definitions files require env at the top. I''ll add an automatic alias of the methods so you don''t have to do it manually. Next release. Aslak> > Obviously my target is to write the features and step_definitions in > the same language, consistently throughout a project, depending on the > language spoken by the client. > > Also, i am looking into a way of sharing common step_definitions, > maybe inside a folder features/common_step_definitions and maybe > require it in both profiles? > > Any hints and suggestions very appreciated! > > Cucumber is awesome! Keep rocking! > Alberto. > _______________________________________________ > 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/20081125/4d5dbef5/attachment.html>
Fernando García Samblas
2008-Nov-26 16:30 UTC
[rspec-users] Cucumber Problems with setup selenium/webrat + languages
> On Tue, Nov 25, 2008 at 1:23 PM, Alberto Perdomo > <alberto.perdomo at aentos.es <mailto:alberto.perdomo at aentos.es>> wrote: > > Hi all, > > i''ve gotten started with cucumber thanks to Fernando and Raimond who > gave a brilliant talk about cucumber at the Conferencia Rails in > Madrid a few weeks ago. Congratulations again guys! >Thanks!!!> aslak hellesoy escribi?: > Currently you have to alias the 4-5 methods yourself. I recommend > doing that in your env.rb file - and make sure the stepd_definitions > files require env at the top.For example, we''ve got these three aliases for our daily pleasure: module Cucumber::StepMethods alias_method :Dado, :Given alias_method :Cuando, :When alias_method :Entonces, :Then end> I''ll add an automatic alias of the methods so you don''t have to do it > manually. Next release.Cool!!! Nando> > Aslak > > > > Obviously my target is to write the features and step_definitions in > the same language, consistently throughout a project, depending on the > language spoken by the client. > > Also, i am looking into a way of sharing common step_definitions, > maybe inside a folder features/common_step_definitions and maybe > require it in both profiles? > > Any hints and suggestions very appreciated! > > Cucumber is awesome! Keep rocking! > Alberto. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org <mailto: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-- Fernando Garc?a Samblas fernando.garcia at the-cocktail.com The Cocktail C/ Salamanca 17 28020 Madrid +34 91 567 06 05
Aslak Hellesøy
2008-Nov-26 23:47 UTC
[rspec-users] Cucumber Problems with setup selenium/webrat + languages
Please add a ticket since I suffer from amnesia. Sendt fra min iPhone Den 26. nov.. 2008 kl. 17.30 skrev Fernando Garc?a Samblas <fernando.garcia at the-cocktail.co m>:> >> On Tue, Nov 25, 2008 at 1:23 PM, Alberto Perdomo >> <alberto.perdomo at aentos.es <mailto:alberto.perdomo at aentos.es>> wrote: >> >> Hi all, >> >> i''ve gotten started with cucumber thanks to Fernando and Raimond >> who >> gave a brilliant talk about cucumber at the Conferencia Rails in >> Madrid a few weeks ago. Congratulations again guys! >> > > Thanks!!! > >> aslak hellesoy escribi?: >> Currently you have to alias the 4-5 methods yourself. I recommend >> doing that in your env.rb file - and make sure the stepd_definitions >> files require env at the top. > > For example, we''ve got these three aliases for our daily pleasure: > > module Cucumber::StepMethods > alias_method :Dado, :Given > alias_method :Cuando, :When > alias_method :Entonces, :Then > end > >> I''ll add an automatic alias of the methods so you don''t have to do it >> manually. Next release. > > Cool!!! > Nando > >> >> Aslak >> >> >> >> Obviously my target is to write the features and >> step_definitions in >> the same language, consistently throughout a project, depending >> on the >> language spoken by the client. >> >> Also, i am looking into a way of sharing common step_definitions, >> maybe inside a folder features/common_step_definitions and maybe >> require it in both profiles? >> >> Any hints and suggestions very appreciated! >> >> Cucumber is awesome! Keep rocking! >> Alberto. >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org <mailto: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 > > > -- > Fernando Garc?a Samblas > fernando.garcia at the-cocktail.com > > The Cocktail > C/ Salamanca 17 > 28020 Madrid > +34 91 567 06 05 > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users