Skip to content

Instantly share code, notes, and snippets.

@liangzan
Created September 8, 2010 23:47
Show Gist options
  • Save liangzan/571077 to your computer and use it in GitHub Desktop.
Save liangzan/571077 to your computer and use it in GitHub Desktop.
# spec/commit_button_spec.rb
it 'should pass options given in :button_html to the button' do
@new_post.stub!(:new_record?).and_return(false)
semantic_form_for(@new_post) do |builder|
concat(builder.commit_button('text', :button_html => {:class => 'my_class', :id => 'my_id'}))
end
output_buffer.should have_tag('li.commit input#my_id')
output_buffer.should have_tag('li.commit input.my_class')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment