search for: form_test_helper

Displaying 3 results from an estimated 3 matches for "form_test_helper".

2006 Nov 06
1
Integration testing: coupling of get and post on forms
This is such a vague request it''s not even worthy of a ticket, but: When rspec does support integration testing, it''d be really nice to be able to do things like this plugin does for standard Rails tests: http://www.jasongarber.com/articles/2006/10/24/easier-testing-of-forms-form_test_helper In a nutshell, it finally closes the loop between "the empty form sent by a get" and "the filled-in form returned on a post". Instead of blindly posting parameters, you''re now actually filling in form fields in the tests. Works with hidden fields and everything, t...
2007 Oct 24
3
Using Mechanize in Story Step Implementations
Hi, Thought this might be of interest story writers. The mechanize plugin seems to play nice with RSpec. The following mix of methods seems to work just fine. I especially like the helpers for populating forms. agent = WWW::Mechanize.new page = agent.get ''http://www.gmail.com'' page.should have_tag(''form'', :count => 1) form = page.forms.first form.email =
2008 Mar 13
22
Specifing methods in a steps_for block
Hey list, I''m refactoring some much-used functionality into a common_steps step group. Methods like this are in there: steps_for :common do Given "a number of existing $types?" do |type| @initial_item_count = type.singularize.classify.constantize.count end When "the user adds an invalid $type" do |type| post