require 'spec_helper' describe "selections/edit" do before(:each) do @selection = assign(:selection, stub_model(Selection, :name => "MyString", :parent_id => 1, :system_code => "MyString", :position => 1, :is_default => false, :is_system => false )) end it "renders the edit selection form" do render # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "form", :action => selections_path(@selection), :method => "post" do assert_select "input#selection_name", :name => "selection[name]" assert_select "input#selection_parent_id", :name => "selection[parent_id]" assert_select "input#selection_system_code", :name => "selection[system_code]" assert_select "input#selection_position", :name => "selection[position]" assert_select "input#selection_is_default", :name => "selection[is_default]" assert_select "input#selection_is_system", :name => "selection[is_system]" end end end