Skip to content

Instantly share code, notes, and snippets.

@seventhsense
Created March 16, 2013 07:48
Show Gist options
  • Save seventhsense/5175431 to your computer and use it in GitHub Desktop.
Save seventhsense/5175431 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe "todos/edit" do
before(:each) do
@todo = assign(:todo, stub_model(Todo,
:title => "MyString",
:done => false
))
end
it "renders the edit todo form" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "form[action=?][method=?]", todo_path(@todo), "post" do
assert_select "input#todo_title[name=?]", "todo[title]"
assert_select "input#todo_done[name=?]", "todo[done]"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment