Sha256: c93b00e5e94c78e50a58656796d4c4dc4fd28af14a6014a7598ea7ffd2fb554b

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

ActiveRecord Model annotated with 'has_custom_field_behavior' with no options in declaration
- should have many attributes
- should create new attribute on save
- should delete attribute
- should write eav attributes to attributes table
- should return nil when attribute does not exist
- should use method missing to make attribute seem as native property
- should read attributes using subscript notation
- should read the attribute when invoking 'read_attribute'

ActiveRecord Model annotated with 'has_custom_field_behavior' with options in declaration
- should be 'has_many' association on both sides
- should only allow restricted fields when specified (:fields => %w(phone aim icq))
- should raise 'NoMethodError' when attribute not in 'custom_field_attributes' method array
- should raise 'NoMethodError' when attribute does not satisfy 'is_custom_field_attribute?' method

Validations on ActiveRecord Model annotated with 'has_custom_field_behavior'
- should execute as normal (validates_presence_of)

Finished in 0.239663 seconds

13 examples, 0 failures

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
has_custom_fields-0.0.5 SPECDOC
has_custom_fields-0.0.4 SPECDOC
has_custom_fields-0.0.3 SPECDOC
has_custom_fields-0.0.2 SPECDOC
has_custom_fields-0.0.1 SPECDOC