Posted over 2 years ago. Visible to the public. Repeats. Linked content.

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

Setting array columns

When using PostgreSQL array columns, you can set an array attribute to a value with square brackets:

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

Setting has_many associations

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

Copy
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:

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

Floating point values with be parsed as BigDecimal.

Your development team has a full backlog of feature requests, chores and refactoring coupled with deadlines? We are familiar with that. With our "DevOps as a Service" offering, we support developer teams with infrastructure and operations expertise.

Owner of this card:

Avatar
Henning Koch
Last edit:
over 2 years ago
by Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more