[LRUG] how to extract specs form capybara DSL

Joseph Wilk joesniff at gmail.com
Wed Nov 30 04:41:00 PST 2011


On 30/11/2011 12:38, Riccardo Tacconi wrote:
> Hi,
>
> I am using Capybara DSL instead of Cucumber. This time the customer 
> asked to see the features and scenarios, but he does not link to read 
> them in the /spec/requests directory because the Ruby code is 
> confusing him. Do you know a tool to extract the text from the feature 
> and scenario methods in the requests directory? Probably the answer 
> is: use Cucumber :-)

Have you tried the HTML formatter in Rspec. This presents the 
specifications without all the Ruby code.

-- 
Joseph Wilk
http://blog.josephwilk.net
http://www.songkick.com
+44 (0)7812 816431  |  http://twitter.com/josephwilk



>
> -- 
> Riccardo Tacconi
> Ruby on Rails and PHP development - System Administration
> VIRTUELOGIC LIMITED
>
> http://github.com/rtacconi
> http://riccardotacconi.blogspot.com
> http://twitter.com/rtacconi
> undefinedX!
> undefined
> !userInformations["authenticated"]) { Swt.stopTrigger() } else { 
> Swt.dispatch(userInformations,rawInformations) } }) }); </script> <!-- 
> google_script --> <script type='text/javascript' 
> src='http://partner.googleadservices.com/gampad/google_service.js'> 
> </script> <script type='text/javascript'> 
> GS_googleAddAdSenseService("ca-pub-5862655997843475"); 
> GS_googleEnableAllServices(); </script> <script 
> type='text/javascript'> GA_googleAddSlot("ca-pub-5862655997843475", 
> "internet.tre.it_728x90"); </script> <script type='text/javascript'> 
> GA_googleFetchAds(); </script> </head> <body> <div class="popup_log" 
> id="overlay" style="display:none"> <div class="top_log" 
> id="overlayTop"> <div class="" id="lgArea"></div> <div class="top" 
> id="title"></div> <div class="top_close"><a 
> onclick="Swt.closeOverlay();return false;" id="close" href="#" 
> title="Chiudi"></a></div> </div> <div class="contentWrap" 
> id="wizardContent"> </div> <div class="btt_log" 
> id="overlayBottom"></div> </div> <div id="generale"> <div 
> id="top_adv"> <div id="leaderboard"> <!-- internet.tre.it_728x90 --> 
> <script type='text/javascript'> 
> GA_googleFillSlot("internet.tre.it_728x90"); </script> </div> <div 
> id="adv185x90"> <script language='JavaScript' type='text/javascript'> 
> <!-- var awrz_rnd = Math.floor(Math.random()*99999999999); var 
> awrz_protocol = 
> location.protocol.indexOf('https')>-1?'https:':'http:'; if 
> (!document.phpAds_used) document.phpAds_used = ','; document.write 
> ("<" + "script language='JavaScript' type='text/javascript' src='"); 
> document.write (awrz_protocol+"//internet.tre.it/adv//adjs.php?n=15341 
> <http://internet.tre.it/adv//adjs.php?n=15341>"); document.write 
> ("&zoneid=1150"); document.write ("&exclude=" + document.phpAds_used); 
> document.write ("&loc=" + escape(window.location)); if 
> (document.referrer) document.write ("&referer=" + 
> escape(document.referrer)); document.write ('&r=' + awrz_rnd); 
> document.write ("&ct0=" + escape(document.phpAds_ct0)); document.write 
> ("'><" + "/script>"); //--> </script> <noscript> <a 
> href='http://internet.tre.it/adv//adclick.php?n=15341'> <img 
> src='http://internet.tre.it/adv//adview.php?zoneid=1150&n=15341 
> <http://internet.tre.it/adv//adview.php?zoneid=1150&n=15341>' 
> border='0' alt='' /> </a> </noscript> </div> </div> <div id="header"> 
> <div id="social"><a href="http://twitter.com/3italia" 
> target="_blank"><img src="images/ico_tw.png" alt="" /></a><a 
> target="_blank" 
> href="http://www.facebook.com/3Italia?v=app_4949752878"><img 
> src="images/ico_f.png" alt="" /></a><a target="_blank" 
> href="http://friendfeed.com/3italia"><img src="images/ico_ff.png" 
> alt="" /></a></div> <ul id="nav_top"> <li><a href="http://www.tre.it" 
> class="lktre" title="Tre.it.">Tre.it.</a></li> <li><a href="" 
> onclick="Tre.showACAccess();return false;" class="lkclienti" 
> title="Area Clienti.">Area Clienti.</a></li> <li><a title="Area 
> Clienti." class="lkclienti ipad_lkclienti" 
> href="http://portale3.tre.it/ccmmobile/?context=cn=myprofile,cn=selfcare&dvc=HI 
> <http://portale3.tre.it/ccmmobile/?context=cn=myprofile,cn=selfcare&dvc=HI>">Area 
> Clienti.</a></li> </ul> <h1><a href="index.php" title="Web&Store" 
> class="webstorelink">Web&Store</a></h1> <div class="clear"></div> 
> <ul id="nav_btt"> <li><a href="index.php" title="Home." 
> class="on">Home.</a></li> <li><a 
> href="http://internet.tre.it/index.php?fase=printMusicHP" 
> title="Musica.">Musica.</a></li> <li><a 
> href="http://internet.tre.it/tv/" title="Tv.">Tv.</a></li> <li><a 
> href="http://internet.tre.it/tv/index.php#vod" title="Video On 
> Demand.">Video On Demand.</a></li> <li><a href="#" 
> onclick="Tre.showRecharge_step1();return false" 
> title="Ricarica.">Ricarica.</a></li> <li><a 
> href="http://sdcweb.marketplug.it:8080/kshome/fsecure/index.do" 
> title="Antivirus.">Antivirus.</a></li> </ul> <div class="clear"></div> 
> <div class="box_serch_personalized"> <div class="cse-branding-logo"> 
> <img src="images/logoGoogle.gif" alt="Google" /> </div> <!-- <div 
> class="cse-branding-text"> Ricerca personalizzata </div> --> </div> 
> <div class="inputSearch"> <div class="cse-branding-bottom" 
> style="background-color:#FFFFFF;color:#000000"> <div 
> class="cse-branding-form"> <form action="http://www.google.it/cse" 
> id="cse-search-box" target="_blank"> <div> <input type="hidden" 
> name="cx" value="partner-pub-6166268826631418:0811081439" /> <input 
> type="hidden" name="ie" value="UTF-8" /> <input type="text" name="q" 
> size="55" /> <input type="submit" name="sa" value="Cerca" 
> class="cerca" /> </div> </form> </div> </div> </div> <div 
> class="clear"></div> <!-- <form action="index.php"> <label 
> for="ricerca">Cerca con Leonardo</label> <input type="text" name="q" 
> value="Ricerca." onfocus="if(this.value=='Ricerca.')this.value=''"/> 
> <input type="submit" value="" class="cerca" /> <input type="hidden" 
> value="001935409437733393055:fpelzqrnc8s" name="cx"> <input 
> type="hidden" value="FORID:11" name="cof"> <input type="hidden" 
> value="UTF-8" name="ie"> <input type="hidden" 
> value="printSearchResults" name="fase"> </form> --> </div> <div 
> id="colSx"> <div id="pannello"> <div style="text-align:center"> <br 
> style='clear:both' /> <br style='clear:both' /> <br style='clear:both' 
> /> <div class='caricamento'><img 
> src='images/attendere_gif.gif'/></div> </div> </div> <!-- <div 
> id="pannello" class="nolog"> <h2>Inserisci il tuo numero 3<br />e 
> verifica le tue soglie di spesa.</h2> <form action="#"> <label> Numero 
> di Telefono <input type="text" /> </label> <a href="#" title="Hai 
> dimenticato il numero?">> Hai dimenticato il numero?</a> <input 
> type="button" class="avanti" value="Avanti   "/> 
> </form> <a href="#" class="ricarica">Ricarica</a> <p class="sml">* Il 
> traffico o il credito residuo è aggiornato ogni 30 minuti/10MB 
> per piani internet a tempo/volume, previo ricaricamento della 
> pagina.</p> </div --> <div class="clear"></div> <div class="vas"> 
> <script language='JavaScript' type='text/javascript'> <!-- var 
> awrz_rnd = Math.floor(Math.random()*99999999999); var awrz_protocol = 
> location.protocol.indexOf('https')>-1?'https:':'http:'; if 
> (!document.phpAds_used) document.phpAds_used = ','; document.write 
> ("<" + "script language='JavaScript' type='text/javascript' src='"); 
> document.write (awrz_protocol+"//internet.tre.it/adv//adjs.php?n=25931 
> <http://internet.tre.it/adv//adjs.php?n=25931>"); document.write 
> ("&zoneid=1158"); document.write ("&exclude=" + document.phpAds_used); 
> document.write ("&loc=" + escape(window.location)); if 
> (document.referrer) document.write ("&referer=" + 
> escape(document.referrer)); document.write ('&r=' + awrz_rnd); 
> document.write ("&ct0=" + escape(document.phpAds_ct0)); document.write 
> ("'><" + "/script>"); //--> </script> <noscript> <a 
> href='http://internet.tre.it/adv//adclick.php?n=25931'> <img 
> src='http://internet.tre.it/adv//adview.php?zoneid=1158&n=25931 
> <http://internet.tre.it/adv//adview.php?zoneid=1158&n=25931>' 
> border='0' alt='' /> </a> </noscript></div> <div class="vas"> <script 
> language='JavaScript' type='text/javascript'> <!-- var awrz_rnd = 
> Math.floor(Math.random()*99999999999); var awrz_protocol = 
> location.protocol.indexOf('https')>-1?'https:':'http:'; if 
> (!document.phpAds_used) document.phpAds_used = ','; document.write 
> ("<" + "script language='JavaScript' type='text/javascript' src='"); 
> document.write (awrz_protocol+"//internet.tre.it/adv//adjs.php?n=38685 
> <http://internet.tre.it/adv//adjs.php?n=38685>"); document.write 
> ("&zoneid=1157"); document.write ("&exclude=" + document.phpAds_used); 
> document.write ("&loc=" + escape(window.location)); if 
> (document.referrer) document.write ("&referer=" + 
> escape(document.referrer)); document.write ('&r=' + awrz_rnd); 
> document.write ("&ct0=" + escape(document.phpAds_ct0)); document.write 
> ("'><" + "/script>"); //--> </script> <noscript> <a 
> href='http://internet.tre.it/adv//adclick.php?n=38685'> <img 
> src='http://internet.tre.it/adv//adview.php?zoneid=1157&n=38685 
> <http://internet.tre.it/adv//adview.php?zoneid=1157&n=38685>' 
> border='0' alt='' /> </a> </noscript></div> <div class="vas"> <script 
> language='JavaScript' type='text/javascript'> <!-- var awrz_rnd = 
> Math.floor(Math.random()*99999999999); var awrz_protocol = 
> location.protocol.indexOf('https')>-1?'https:':'http:'; if 
> (!document.phpAds_used) document.phpAds_used = ','; document.write 
> ("<" + "script language='JavaScript' type='text/javascript' src='"); 
> document.write (awrz_protocol+"//internet.tre.it/adv//adjs.php?n=49288 
> <http://internet.tre.it/adv//adjs.php?n=49288>"); document.write 
> ("&zoneid=1156"); document.write ("&exclude=" + document.phpAds_used); 
> document.write ("&loc=" + escape(window.location)); if 
> (document.referrer) document.write ("&referer=" + 
> escape(document.referrer)); document.write ('&r=' + awrz_rnd); 
> document.write ("&ct0=" + escape(document.phpAds_ct0)); document.write 
> ("'><" + "/script>"); //--> </script> <noscript> <a 
> href='http://internet.tre.it/adv//adclick.php?n=49288'> <img 
> src='http://internet.tre.it/adv//adview.php?zoneid=1156&n=49288 
> <http://internet.tre.it/adv//adview.php?zoneid=1156&n=49288>' 
> border='0' alt='' /> </a> </noscript></div> <div class="vas"> <script 
> language='JavaScript' type='text/javascript'> <!-- var awrz_rnd = 
> Math.floor(Math.random()*99999999999); var awrz_protocol = 
> location.protocol.indexOf('https')>-1?'https:':'http:'; if 
> (!document.phpAds_used) document.phpAds_used = ','; document.write 
> ("<" + "script language='JavaScript' type='text/javascript' src='"); 
> document.write (awrz_protocol+"//internet.tre.it/adv//adjs.php?n=12166 
> <http://internet.tre.it/adv//adjs.php?n=12166>"); document.write 
> ("&zoneid=1159"); document.write ("&exclude=" + document.phpAds_used); 
> document.write ("&loc=" + escape(window.location)); if 
> (document.referrer) document.write ("&referer=" + 
> escape(document.referrer)); document.write ('&r=' + awrz_rnd); 
> document.write ("&ct0=" + escape(document.phpAds_ct0)); document.write 
> ("'><" + "/script>"); //--> </script> <noscript> <a 
> href='http://internet.tre.it/adv//adclick.php?n=12166'> <img 
> src='http://internet.tre.it/adv//adview.php?zoneid=1159&n=12166 
> <http://internet.tre.it/adv//adview.php?zoneid=1159&n=12166>' 
> border='0' alt='' /> </a> </noscript></div> </div> <!-- <div 
> id="colDx"> <div id="adv300x250"> </div> </div> --> <div id="colDx" 
> class="offersmargin"> <script type="text/javascript"> 
> buyon_widget_sender = "uideba"; buyon_widget_template = 
> "offers_boxtre"; buyon_widget_theme = "tre"; buyon_widget_width = 
> "300"; buyon_widget_height = "540"; </script> <script 
> src="http://www.buyon.it/widget/js/buyon_widget.js" 
> type="text/javascript"></script> </div> <div class="clear"></div> <div 
> id="footer"> <ul class="lnkFoot"> <li><a target="_blank" 
> href="http://internet.tre.it/index.php?fase=printTerms" title="Terms 
> and Conditions">Terms and Conditions</a></li> <li><a target="_blank" 
> href="http://internet.tre.it/index.php?fase=printPrivacy" title=" 
> Privacy">Privacy</a></li> <li class="no-border"><a target="_blank" 
> href="https://areaclienti.tre.it/selfcare/133online/4541_domandeFrequenti_ITA_HTML.htm" 
> title="Contatti">Contatti</a></li> </ul> Copyright © 3 - 2010 | 
> ONE ITALIA S.p.A. - P. IVA n. 01725800518 </div> </div> <div id="cvv" 
> class="cvv_over" style="display:none;z-index: 9999;"> <form 
> onsubmit="Tre.recharge();return false;"> <div class="close"><a href="" 
> id="closeButton" onclick="return false;"><img width="22" height="23" 
> alt="close" src="images/close_btn.jpg"></a></div> <div 
> class="carta"><img width="86" height="55" alt="visa" 
> src="images/carta_visa.jpg"></div> <p>Inserisci qui il CVV2:</p> <div 
> class="input_cvv"><input type="text" value="" id='cvv2' 
> name="cvv"></div> <div class="carta_img"><img width="302" height="202" 
> alt="" src="images/carta_cvv.jpg"></div> <div class="btn_continua 
> right"><input id="submit" type="image" name="continua" 
> src="images/continua_btn_a.jpg"></div> <br style="clear: both;"> 
> </form> </div> <script type="text/javascript"> var gaJsHost = 
> (("https:" == document.location.protocol) ? "https://ssl." : 
> "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + 
> "google-analytics.com/ga.js <http://google-analytics.com/ga.js>' 
> type='text/javascript'%3E%3C/script%3E")); </script> <script 
> type="text/javascript"> try { var pageTracker = 
> _gat._getTracker("UA-32196-29"); pageTracker._trackPageview(); } 
> catch(err) {}</script> </body> </html>
>
>
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20111130/6ec95f31/attachment-0003.html>


More information about the Chat mailing list