[rspec-users] Another attempt for a succinct model validation DSL

Joseph Method tristil at gmail.com
Fri Jun 1 12:17:31 EDT 2007


What about 'this' as a reserved name for what's given?

given { User.new }
this.should_reject (nil)

given { User.new(:name => 'Bob' }
this.should_reject(nil)

On 6/1/07, nicholas a. evans <nick at ekenosen.net> wrote:
> On 6/1/07, nicholas a. evans <nick at ekenosen.net> wrote:
> > But here's my current favorite approach: http://pastie.caboo.se/66862
>
> Ack!  I had some silly/bad ruby syntax in that last pastie.
>
> Let's try that again; now with improved (valid) ruby syntax!
>
> http://pastie.caboo.se/66896
>
> --
> Nick
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


-- 
-J. Method


More information about the rspec-users mailing list