Nick Hoffman <[EMAIL PROTECTED]> writes:

> On 2008-10-28, at 09:09, Cameron Booth wrote:
>> describe User do
>>   it_should_validate_presence_of :name
>> end
>>
>> I can get it working if I pass in User as an argument:
>>
>> describe User do
>>   it_should_validate_presence_of User, :name
>> end
>
> Hi Cameron. I haven't played with RSpec's internals at all, but
> considering that
>     #it_should_validate_presence_of
> is nested within
>     describe User do
> I would imagine that there's a way to grab "User". Have a look at the
> structure of the Example, ExampleGroup, etc classes. It'll be stored
> in one of those, somewhere.

For some reason my emails are getting bounced or delayed or something,
so I'll try again in case my first one didn't go through...

You're looking for described_type

Pat
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to