Module: Fixtures::BigDecimal
- Extended by:
- BigDecimal
- Includes:
- Fixtures
- Included in:
- BigDecimal
- Defined in:
- lib/data_model/fixtures/big_decimal.rb
Overview
test fixtures for BigDecimal
Instance Method Summary collapse
-
#max ⇒ Example
a decimal example that has a restriction on the maximum value.
-
#min ⇒ Example
a decimal example that has a restriction on the minimum value.
-
#optional ⇒ Example
a decimal example that is optional.
-
#simple ⇒ Example
a simple decimal example.
Instance Method Details
#max ⇒ Example
a decimal example that has a restriction on the maximum value
47 48 49 50 51 52 53 54 55 |
# File 'lib/data_model/fixtures/big_decimal.rb', line 47 def max Example.new( [:decimal, { max: 5 }], variants: { bigger: 6.to_d, smaller: 4.to_d }, ) end |
#min ⇒ Example
a decimal example that has a restriction on the minimum value
35 36 37 38 39 40 41 42 43 |
# File 'lib/data_model/fixtures/big_decimal.rb', line 35 def min Example.new( [:decimal, { min: 5 }], variants: { bigger: 6.to_d, smaller: 4.to_d }, ) end |