Created
May 25, 2009 19:52
-
-
Save wasnotrice/117716 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # from casted_model_spec.rb | |
| class WithCastedModelMixin < Hash | |
| include CouchRest::CastedModel | |
| property :name | |
| property :no_value | |
| property :details, :default => {} | |
| property :casted_attribute, :cast_as => 'WithCastedModelMixin' | |
| end | |
| class DummyModel < CouchRest::ExtendedDocument | |
| use_database TEST_SERVER.default_database | |
| raise "Default DB not set" if TEST_SERVER.default_database.nil? | |
| property :casted_attribute, :cast_as => 'WithCastedModelMixin' | |
| property :keywords, :cast_as => ["String"] | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment