Skip to content

Instantly share code, notes, and snippets.

@wycats
Created August 22, 2008 23:36
Show Gist options
  • Save wycats/6872 to your computer and use it in GitHub Desktop.
Save wycats/6872 to your computer and use it in GitHub Desktop.
it "should render a collection of nested value/content arrays" do
form_for @obj do
content = select(:foo, :collection => [["small", "Small"], ["medium", "Medium"], ["large", "Large"]])
content.should match_tag(:select, :id => "fake_model_foo", :name => "fake_model[foo]")
content.should match_tag(:option, :value => "small", :content => "Small")
content.should match_tag(:option, :value => "medium", :content => "Medium")
content.should match_tag(:option, :value => "large", :content => "Large")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment