1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/fixtures/pirates.yml
Eric Steele f47421f2a0 Extend fixture label replacement to allow string interpolation
Allows fixtures to use their $LABEL as part of a string instead
of limiting use to the entire value.

    mark:
      first_name: $LABEL
      username: $LABEL1973
      email: $LABEL@$LABELmail.com

    users(:mark).first_name # => mark
    users(:mark).username   # => mark1973
    users(:mark).email      # => mark@markmail.com
2014-03-15 22:11:36 -04:00

12 lines
236 B
YAML

blackbeard:
catchphrase: "Yar."
parrot: george
redbeard:
catchphrase: "Avast!"
parrot: louis
created_on: "<%= 2.weeks.ago.to_s(:db) %>"
updated_on: "<%= 2.weeks.ago.to_s(:db) %>"
mark:
catchphrase: "X $LABELs the spot!"