Hi Jon,<br><br>I've been having alot of fun with Story Runner this week.<br>I'm trying to find the time this week to do a screencast on story runner.<br><br>Here'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't use in my example how you'd like to check for the url.<br>I'm unsure or haven't clearly read over your goal. I'll take a look later.
<br><br><br><div><span class="gmail_quote">On 9/25/07, <b class="gmail_sendername">David Chelimsky</b> <<a href="mailto:dchelimsky@gmail.com">dchelimsky@gmail.com</a>> 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 <<a href="mailto:jonathan@parkerhill.com">jonathan@parkerhill.com</a>> wrote:<br>> hi,<br>><br>> I just started fooling around with story runner, thought I'd start<br>> with a dead simple scenario:
<br>> The first thing I do when describing a site to someone is go to the<br>> home page, and begin exploring public pages from there.<br>> So, that seems like a good first story to spec out.<br>><br>> And I'd really like to extract the actual link from the rendered page
<br>> (rather than just "assuming" in the spec), but I'm not sure how to do<br>> that<br>> Something like:<br>><br>> # alink = find tag 'div#home-banner-links a ' where<br>> content=="About"
<br>> # url = extract the href attribute from alink<br>> get url<br>><br>> Here'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 "should render_template" in a Story seems too<br>low level to me. What'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'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="<a href="http://0.0.0.0:3000/site_pages/about">http://0.0.0.0:3000/site_pages/about</a>",<br>you'd need to extract the "/site_pages/about" part and get that.<br><br>
Thoughts?<br><br>><br>> I'd appreciate suggestions as this seems like something I'd like to<br>> do alot. Thanks<br>><br>> linoj<br>><br>><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>><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>