Sha256: 861ee2b24cf76ea5e469f40d9976e3f90f36a4dce6971aae4731161b2ead8f92

Contents?: true

Size: 682 Bytes

Versions: 2

Compression:

Stored size: 682 Bytes

Contents

Feature: Update cached attributes after saving the child record

  Scenario:
    Given model "Author" exists with attributes:
      | attribute | type   |
      | name      | string |
    And model "Book" exists with attributes:
      | attribute   | type    |
      | title       | string  |
      | author_id   | integer |
      | author_name | string  |
    And Book cached_belongs_to Author with cached: "name"
    And Author has many Books
    And a Author exists:
      | name | John Mellencamp |
    And a Book exists:
      | title | Treasure Island |
    And that Book belongs to that Author
    When I save the Book
    Then Book's author name should be "John Mellencamp"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cached_belongs_to-0.0.2 features/update_cached_attributes_after_save_child_record.feature
cached_belongs_to-0.0.1 features/update_cached_attributes_after_save_child_record.feature