search for: randomformbuilder

Displaying 1 result from an estimated 1 matches for "randomformbuilder".

2009 Feb 05
1
[rspec] [rails] Specing a form builder
I''m trying to set up and run a new form builder under rails, which lives under the helpers directory, but isn''t really a helper. (Not a module, so doesn''t mix in well) Short of dropping down into a view spec, how do I set up to actually spec the form builder? describe RandomFormBuilder do attr_reader :builder before do @object = mock_model(Foo) @builder = RandomFormBuilder.new(:foo, @object, #template#, {}, nil) end describe "#text_field" do it "should have a label" do @builder.text_field(:foo).should have_tag("label", &q...