Created
March 16, 2013 07:48
-
-
Save seventhsense/5175433 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "todos/new" do | |
before(:each) do | |
assign(:todo, stub_model(Todo, | |
:title => "MyString", | |
:done => false | |
).as_new_record) | |
end | |
it "renders new todo form" do | |
render | |
# Run the generator again with the --webrat flag if you want to use webrat matchers | |
assert_select "form[action=?][method=?]", todos_path, "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