On Fri, Sep 12, 2008 at 10:01 AM, Pat Maddox <[EMAIL PROTECTED]> wrote: > On Fri, Sep 12, 2008 at 10:58 AM, Damian Jones <[EMAIL PROTECTED]> wrote: >> David >> >> Are you saying this part should work: >> >> And "the page should show", "Product 1" do |text| >> response.should have_text(/#{text}/) >> end >> >> because I'm getting nil for this step too. > > Is the request actually completing successfully? It seems like there > might be an exception that's preventing the page from rendering.
That is what it sounds like. Also - once you get this working, there is a general style/approach issue that you may want to ponder - what you've got there will output something like this: Given No products in the system When I Post to Then show template should be rendered And the page should show And the page should show And Confirm the product was successfully saved Obviously, this isn't that helpful as the arguments don't get rendered. The approach you are taking has not really been recommended for a while and will not be supported in Cucumber, which is probably going to be replacing RSpec's Story Runner. To make that transition easy for you, I'd recommend either moving to cucumber now, or at least taking the "decoupled step definitions" approach within Story Runner. Check out http://pastie.org/271244 (with the steps, story and output) and let me know if it makes sense to you. HTH, David _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users