So, what we should use? 'not_to' or 'to_not'?

On Tuesday, 14 September 2010 04:13:45 UTC+2, [email protected] wrote:
>
> On Sep 7, 2010, at 10:35 PM, Takumi Tsunokake wrote:
>
> > Hi, I'm Takumi Tsunokake.
> > 
> > I think
> >    expect { ... }.not_to rails_error
> > is more grammatical and natural than
> >    expect { ... }.to_not rails_error
>
> I think you mean raise_error (I've made the same mistake a few times). I'm 
> pretty sure they're equally valid, grammatically speaking:
>
> Expect x not to y
> Expect x to not y
>
> > Are there any backgrounds and reasons of decision for expect
> > { ... }.to_not, not expect { ... }.not_to?
> > 
> > I'm happy if expect { ... }.to_not is changed to expect
> > { ... }.not_to.
>
> It's because it aligns better with should[_not]. I think it would be more 
> confusing if we had [not_]to and [should_]not.
>
> HTH,
> David
> _______________________________________________
> rspec-users mailing list
> [email protected] <javascript:>
> http://rubyforge.org/mailman/listinfo/rspec-users
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/fc265d4f-e561-4a7f-bc8a-c24eb5b92f80%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to