Support PORO object <de>serialization
Use object()
method to serialize/deserialize PORO objects in a fixture:
# target.yml
---
number: <%= object(be_positive) %>
RSpec.describe "example" do
subject { { number: 42 } }
# no explicit parameters are needed to send `be_positive`
let(:target) { load_fixture "target.yml" }
it { is_expected.to match(target) }
end
In versions v0.4.1 and below, the same feature required sending data explicitly:
---
number: <%= positive %>
RSpec.describe "example" do
# ...
let(:target) { load_fixture "target.yml", positive: be_positive }
# ...
end