Hi Jon,<br><br>I&#39;ve been having alot of fun with Story Runner this week.<br>I&#39;m trying to find the time this week to do a screencast on story runner.<br><br>Here&#39;s an example of how I might write your story.<br>
<br><a href="http://pastie.caboo.se/100835">http://pastie.caboo.se/100835</a><br><br>I didn&#39;t use in my example how you&#39;d like to check for the url.<br>I&#39;m unsure or haven&#39;t clearly read over your goal. I&#39;ll take a look later.
<br><br><br><div><span class="gmail_quote">On 9/25/07, <b class="gmail_sendername">David Chelimsky</b> &lt;<a href="mailto:dchelimsky@gmail.com">dchelimsky@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 9/25/07, Jonathan Linowes &lt;<a href="mailto:jonathan@parkerhill.com">jonathan@parkerhill.com</a>&gt; wrote:<br>&gt; hi,<br>&gt;<br>&gt; I just started fooling around with story runner, thought I&#39;d start<br>&gt; with a dead simple scenario:
<br>&gt; The first thing I do when describing a site to someone is go to the<br>&gt; home page, and begin exploring public pages from there.<br>&gt; So, that seems like a good first story to spec out.<br>&gt;<br>&gt; And I&#39;d really like to extract the actual link from the rendered page
<br>&gt; (rather than just &quot;assuming&quot; in the spec), but I&#39;m not sure how to do<br>&gt; that<br>&gt; Something like:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# alink = find tag &#39;div#home-banner-links a &#39;&nbsp;&nbsp;where<br>&gt; content==&quot;About&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# url = extract the href attribute from alink<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get url<br>&gt;<br>&gt; Here&#39;s the story so far: <a href="http://pastie.caboo.se/100810">http://pastie.caboo.se/100810</a><br><br>Some comments:
<br><br>The second scenario seems more like the right level of abstraction<br>than the first. Using &quot;should render_template&quot; in a Story seems too<br>low level to me. What&#39;s interesting is what is being displayed, not
<br>what template is being used to display it.<br><br>The second scenario does a nicer job of that.<br><br>One thing is that you won&#39;t be able to use the full URL. RailsStory<br>wraps rails integration tests, which provide access to routing, but as
<br>paths, not URLs. So for href=&quot;<a href="http://0.0.0.0:3000/site_pages/about">http://0.0.0.0:3000/site_pages/about</a>&quot;,<br>you&#39;d need to extract the &quot;/site_pages/about&quot; part and get that.<br><br>
Thoughts?<br><br>&gt;<br>&gt; I&#39;d appreciate suggestions as this seems like something I&#39;d like to<br>&gt; do alot. Thanks<br>&gt;<br>&gt; linoj<br>&gt;<br>&gt;<br>&gt; _______________________________________________
<br>&gt; rspec-users mailing list<br>&gt; <a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>&gt; <a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users
</a><br>&gt;<br>_______________________________________________<br>rspec-users mailing list<br><a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/rspec-users">
http://rubyforge.org/mailman/listinfo/rspec-users</a><br></blockquote></div><br>