Add tests for numerically-based property types #30

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

jof commented Feb 27, 2012

There are some DataMapper property types that fail to get saved and reconstituted consistently (DateTime, symbolic and textual Enums). So, I added a few tests to show this.

I feel like there are perhaps some properties whose primitive types are not strings already that just need to get cast or something.
Most of the primitives for the failing types are numeric in nature.

jof added some commits Feb 9, 2012

@jof jof Add a spec to test various types. 5aa0505
@jof jof Add tests for DM properties.
I was noticing that enums seem to fail to load back from Redis. I added
some tests to try out some of the base types in DataMapper and found
that a few things fail.

Perhaps these tests ought to live as a sharable part of dm-core and
included here.
6ccb7e4
Owner

whoahbot commented Mar 3, 2012

Hi jof!

Thanks for the patch. I did some preliminary work on getting enum types to work at one point for another issue, but I haven't come up with a solution that I really like.

Since enum isn't part of the base dm-core install, there needs to be some checking to see if that type is available. I did notice by watching redis monitor that enum keys are stored with a prefix as to which 'type' of enum key it is, so it should be possible to support those types.

whoahbot referenced this pull request Aug 27, 2013

Open

Enums don't work #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment