Rafael
2009-Sep-10 14:44 UTC
cucumber | Then I should see "view.common.status.logged_in_as"
Hi guys, how could I run this scenarion for each language? Is it suitable anyway? I slightly modified the webrat steps: Then /^I should see "([^\"]*)"$/ do |text| response.should contain(I18n.t(text.to_sym)) end Does anybody have a hint for me? Thanks a lot! Rafael
DyingToLearn
2009-Sep-10 20:00 UTC
Re: cucumber | Then I should see "view.common.status.logged_in_as"
It depends on exactly what value is important to the stakeholders. If specific messages are important, then you could use a scenario outline: http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines If it is just important to display a certain message, then what you have done is fine. Just be aware that if you change the names of your translations then this test won''t catch any related bug. I would be inclined to do the first one (Scenario Outlines). It tests what most people care about (the actual message). Paul Cortens http://www.cebuya.com Rafael wrote:> Hi guys, > > how could I run this scenarion for each language? > Is it suitable anyway? > > I slightly modified the webrat steps: > > Then /^I should see "([^\"]*)"$/ do |text| > response.should contain(I18n.t(text.to_sym)) > end > > > Does anybody have a hint for me? > > Thanks a lot! > > Rafael
Rafael Schaer { beYou media }
2009-Sep-13 16:43 UTC
Re: cucumber | Then I should see "view.common.status.logged_in_as"
THnx a lot, that''s exactly what i was looking for! rgds Rafael On 10 Sep., 22:00, DyingToLearn <phy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It depends on exactly what value is important to the stakeholders. If > specific messages are important, then you could use a scenario > outline:http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines > > If it is just important to display a certain message, then what you > have done is fine. Just be aware that if you change the names of your > translations then this test won''t catch any related bug. > > I would be inclined to do the first one (Scenario Outlines). It tests > what most people care about (the actual message). > > Paul Cortenshttp://www.cebuya.com > > > > Rafaelwrote: > > Hi guys, > > > how could I run this scenarion for each language? > > Is it suitable anyway? > > > I slightly modified the webrat steps: > > > Then /^I should see "([^\"]*)"$/ do |text| > > response.should contain(I18n.t(text.to_sym)) > > end > > > Does anybody have a hint for me? > > > Thanks a lot! > > >Rafael