Skip to content

Instantly share code, notes, and snippets.

@mikebannister
Created March 8, 2011 04:10
Show Gist options
  • Save mikebannister/859830 to your computer and use it in GitHub Desktop.
Save mikebannister/859830 to your computer and use it in GitHub Desktop.
it "renders select box with employees job title selected" do
render
rendered.should have_selector("form") do |form|
form.should have_selector("select",
:name => "employee[job_title_id]") do |select|
select.should have_xpath(".//option[@selected = 'selected']") do |option|
p option
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment