Re: [rspec-users] Story Runner, autoincrementing

2007-09-23 Thread Jarkko Laine
Sorry for top posting, this is all I get from the mobile gmail. You don't specify the id of the post when you create one. This is the same for all restful create actions. In case of nested routes, you give the parent resource as a param, with normal routes nothing: post forum_posts_path(@forum)

Re: [rspec-users] Story Runner, autoincrementing

2007-09-23 Thread Andrew WC Brown
I didn't notice that when you create a second story you'd just omit the blocks that were run in the previous scenario This is my second scenario Scenario "Failed creating a new topic due to error" do Given "a user named", "Jon" Given "a forum named", "General" And "user logged in s

Re: [rspec-users] Story Runner, autoincrementing

2007-09-23 Thread Andrew WC Brown
That''s much more clear I noticed you omitted And "user logged in successfully" do |path| post_via_redirect "/session", :login => "Jon", :password => "your_momma" end My user is required to be login so without this story the test will fail. Now should this be in my story because I'm

Re: [rspec-users] Story Runner, autoincrementing

2007-09-22 Thread Pat Maddox
On 9/22/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > I've written a story and I run into a snag. > I've written the create_forum method and told it to set the id to 1 > but when it creates the forum the id is autoincremented. > My forums table is empty but the id keeps incrementing the newest r