RSpec

Turn your tests into specs

VCR

Guard

Factory Girl

Tips and Tricks

How to Add a Serialized Hash Attribute to a Factory_Girl Definition

To include a hash as an attribute of a factory, use a double brackets or pass it as explicit method argument (inside parenthesis):

factory :account do
  config { { version: 2 } }
  # or
  config({ version: 2 })
end

Last updated