Read more

cucumber_factory 1.14 lets you set array fields, has_many associations, numbers without quotes

Henning Koch
October 26, 2018Software engineer at makandra GmbH

Setting array columns

When using PostgreSQL array columns Show archive.org snapshot , you can set an array attribute to a value with square brackets:

Given there is a movie with the tags ["comedy", "drama" and "action"]

Setting has_many associations

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

You can set has_many associations by referring to multiple named records in square brackets:

Given there is a movie with the title "Sunshine"
And there is a movie with the title "Limitless"
And there is a movie with the title "Salt"
And there is a user with the favorite movies ["Sunshine", "Limitless" and "Salt"]

Setting number attributes without quotes

You no longer need to use quotes for number attributes:

Given there is an invoice with the year 2017 and the total 1234.5

Floating point values with be parsed as BigDecimal.

Posted by Henning Koch to makandra dev (2018-10-26 15:56)