require 'spec_helper' describe "posts/edit" do before(:each) do @post = assign(:post, stub_model(Post, :title => "MyString", :body => "MyString" )) end it "renders the edit post form" do render # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "form", :action => posts_path(@post), :method => "post" do assert_select "input#post_title", :name => "post[title]" assert_select "input#post_body", :name => "post[body]" end end end