David Pollak <[email protected]> writes:

>> but I'm running into a problem with the test cases. Since the names of
>> the Mapped objects are fixed once determined, it's hard to reuse the
>> different models in MapperSpecs for the different naming conventions.
>>
>> I was thinking about adding some kind of "reset" method to metamapper,
>> but I always hate when code is added just for testing....
>>
>> Any hints how to solve this?
>>
>
> For performance and stability reasons, I'd strongly recommend making those
> values set-once.

I agree

> How about having two different classes that different just a little in
> terms of name?

Yes but due to the inability (i think?) to really create reusable Mapper
models, you would have to copy both the model classes and the test cases
which I think is not optimal for a maintenance pov.  

I tried wrapping all the models in a class, but then createInstance fails
since there's now no anonymous constructor.....

But I'll do the copy thing for know....

> BTW... Do you know about Helpers.capify?  It might be nice to add snakify
> that'll turn CamelCase into snake_case.

Didn't know that, but there's ClassHelpers.unCamelCase that does snakify
:-) I would think StringHelpers would be a more appropriate place for
this (as well as camelCase)?

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to