Module: Fixtures::Object
- Extended by:
- Object
- Includes:
- Fixtures
- Included in:
- Object
- Defined in:
- lib/data_model/fixtures/object.rb
Overview
test fixtures for object type
Instance Method Summary collapse
-
#optional ⇒ Example
a object example that is optional.
-
#simple ⇒ Example
a simple object example.
- #variants ⇒ Object
Instance Method Details
#optional ⇒ Example
a object example that is optional
23 24 25 |
# File 'lib/data_model/fixtures/object.rb', line 23 def optional Example.new([:object, { optional: true }], variants:) end |
#simple ⇒ Example
a simple object example
17 18 19 |
# File 'lib/data_model/fixtures/object.rb', line 17 def simple Example.new([:object], variants:) end |
#variants ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/data_model/fixtures/object.rb', line 7 def variants { missing: nil, integer: 1, string: "string" } end |