# acceptance/users_spec.rb
page.should have_content 'Włosy'
page.should have_content 'Oczy'
page.should have_content 'Wzrost'
page.should have_content 'Waga'
page.should have_content 'Biust'
page.should have_content 'Biustonosz'
page.should have_content 'Talia'
page.should have_content 'Biodra'
开发者_如何学JAVApage.should have_content 'Ubranie'
page.should have_content 'Obuwie'
page.should have_content 'Zakres pracy'
page.should have_content 'Preferowany region pracy'
page.should have_content 'Języki'
page.should have_content 'O sobie'
page.should have_content 'Twoja strona WWW'
page.should have_content 'Numer Gadu-Gadu'
page.should have_content 'Kursy, szkolenia'
page.should have_content 'Referencje'
I want to know if I could make this code better. I'm using rspec and steak.
Well your test may be overkill -- if the same code is generating each of those items, you can just test one or two of them to make sure the code works.
But otherwise, you could do:
['Włosy', 'Oczy', .....].each { |item| page.should have_content(item) }
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论