Module: Fixtures::Numeric
- Extended by:
- Numeric
- Includes:
- Fixtures
- Included in:
- Numeric
- Defined in:
- lib/data_model/fixtures/numeric.rb
Overview
test fixtures for object type
Instance Method Summary collapse
-
#optional ⇒ Example
a numeric example that is optional.
-
#simple ⇒ Example
a simple numeric example.
- #variants ⇒ Object
Instance Method Details
#optional ⇒ Example
a numeric example that is optional
27 28 29 |
# File 'lib/data_model/fixtures/numeric.rb', line 27 def optional Example.new([:numeric, { optional: true }], variants:) end |
#simple ⇒ Example
a simple numeric example
21 22 23 |
# File 'lib/data_model/fixtures/numeric.rb', line 21 def simple Example.new([:numeric], variants:) end |
#variants ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/data_model/fixtures/numeric.rb', line 9 def variants { missing: nil, integer: 1, float: 1.0, decimal: 1.0.to_d, string: ["1", 1] } end |