spec/support/fixtures.rb in imap-backup-3.2.0 vs spec/support/fixtures.rb in imap-backup-3.2.1
- old
+ new
@@ -1,6 +1,11 @@
+require "erb"
+require "yaml"
+
def fixture(name)
spec_root = File.expand_path("..", File.dirname(__FILE__))
fixture_path = File.join(spec_root, "fixtures", "#{name}.yml")
- fixture = File.read(fixture_path)
- YAML.safe_load(fixture, [Symbol])
+ content = File.read(fixture_path)
+ template = ERB.new(content)
+ yaml = template.result(binding)
+ YAML.safe_load(yaml, [Symbol])
end