Why this yaml file won\'t parse?
--- <% sensor_types = YAML.load_file(\'db/seed-fixtures/sensor_type.yml\') %> <% sensor_types.each do |sensor_type|
You can't load a YAML file containing ERB like a basic YAML file. Checkout this post.
What you can do instead is (in a spec initializer or a before hook):
FIXTURE_CONFIG = YAML.load(ERB.new(File.read("#{Rails.root}/path_to_your_file.yml.erb")).result)
And then use this variable in your test.