It seems to me what you want to do is include the YAML file from another YAML file. This begs the question of how to do this: How to include a YAML file in a YAML file?
Since appliances already have an ERB, it should be as simple as:
<%= IO.read(Rails.root.join "test/other_fixtures/fixture_to_load.yml") %>
Just make sure that the fixtures are outside the main catalog of devices or the loading mechanism of the fixtures will also try to match them with the model.
If you need ERB inside the device, wrap it in ERB.new , for example:
<%= ERB.new(IO.read(Rails.root.join "test/other_fixtures/fixture_to_load.yml")).result %>
alexpls
source share