seems like it'd make sense to just add this to http://code.google.com/
p/rspec-on-rails-matchers/
linoj
On Mar 14, 2008, at 8:48 AM, Brandon Keepers wrote:
Zach,
On 3/14/08, Zach Moazeni <[EMAIL PROTECTED]> wrote:
This hints at another extension I've wanted to write for us for a
while.
C
tracting up one would make our specs more readable.
>
> Damn "To Code" list...
>
> -Zach
>
> Begin forwarded message:
>
> From: Zach Moazeni <[EMAIL PROTECTED]>
> Date: March 13, 2008 1:46:34 PM GMT-04:00
> To: rspec-users
> Subject: Re: [rspec-users] Pr
Zach,
On 3/14/08, Zach Moazeni <[EMAIL PROTECTED]> wrote:
>
> This hints at another extension I've wanted to write for us for a while.
> Common html selector strings, Labels, input fields, textareas, forms,
> links, etc
>
> Really just rolling up something like:
>
> response.shouldhave_tag("input[
electors than abstracting up one would make our specs more
readable.
Damn "To Code" list...
-Zach
Begin forwarded message:
From: Zach Moazeni <[EMAIL PROTECTED]>
Date: March 13, 2008 1:46:34 PM GMT-04:00
To: rspec-users
Subject: Re: [rspec-users] Problems with form_for and partials
We've been going down this route:
http://pastie.caboo.se/165265
We use mocha for our mocking and originally we mocked out the form
builder, but the specs felt crufty. We then converted to instantiating
the FormBuilder and passing it to partials that needed it.
For the views that send in th
Thank you!
for the record, I refactored my code so the view does a form_for, and
any partials that render fields with the form builder does its own
fields_for. This makes the design cleaner and more testable. However,
I'm not sure if there's any performance cost in doing it this way
instea
On Wed, Mar 12, 2008 at 10:19 PM, Jonathan Linowes
<[EMAIL PROTECTED]> wrote:
>
> On Mar 12, 2008, at 5:47 PM, David Chelimsky wrote:
>
> > On Wed, Mar 12, 2008 at 9:43 PM, Zach Dennis
> > <[EMAIL PROTECTED]> wrote:
> >> You can use mocha parameter matching to match on "anything" where
> >> yo
On Mar 12, 2008, at 5:47 PM, David Chelimsky wrote:
> On Wed, Mar 12, 2008 at 9:43 PM, Zach Dennis
> <[EMAIL PROTECTED]> wrote:
>> You can use mocha parameter matching to match on "anything" where
>> your
>> form builder would be passed in. You could also use Mocha's
>> "kind_of"
>> param
On Wed, Mar 12, 2008 at 9:43 PM, Zach Dennis <[EMAIL PROTECTED]> wrote:
> You can use mocha parameter matching to match on "anything" where your
> form builder would be passed in. You could also use Mocha's "kind_of"
> parameter matcher to ensure that what you expect is a FormBuilder
> object.
>
You can use mocha parameter matching to match on "anything" where your
form builder would be passed in. You could also use Mocha's "kind_of"
parameter matcher to ensure that what you expect is a FormBuilder
object.
Another way to do this is to not pass in your form builder, but the
object needed,
Has anyone come up with a solution for stubbing partials and passing
form builders to it?
i have a complex form with many parts, and those are rendered in
partials
On Oct 21, 2007, at 8:46 AM, rupert wrote:
>> i'm having problem with a form_for situation where i'm trying to DRY
>> out the re
> i'm having problem with a form_for situation where i'm trying to DRY
> out the repeated parts of my forms and put them in common/form and
> render the form elements via another partial in controller_name/_form.
> Here's the first form
>
> # app/views/common/form
> <% form_for ... do |f| -%>
> <
David, thanks for that code. I was thinking of something like that myself.
As for the form_for stuff, problem B solved itself when I created the
form builder with its arguments in the correct order, heh. Problem A
is much bigger and harder as the mock form builder i make creates a
wholly different
On 10/20/07, Russell Norris <[EMAIL PROTECTED]> wrote:
> i'm having problem with a form_for situation where i'm trying to DRY
> out the repeated parts of my forms and put them in common/form and
> render the form elements via another partial in controller_name/_form.
> Here's the first form
>
> # a
i'm having problem with a form_for situation where i'm trying to DRY
out the repeated parts of my forms and put them in common/form and
render the form elements via another partial in controller_name/_form.
Here's the first form
# app/views/common/form
<% form_for ... do |f| -%>
<%= render :part
15 matches
Mail list logo