summaryrefslogtreecommitdiff
path: root/spec/support/fixture_file_helper.rb
diff options
context:
space:
mode:
authorCan Eldem <celdem@gitlab.com>2020-04-06 11:59:02 +0000
committerCan Eldem <celdem@gitlab.com>2020-04-06 11:59:02 +0000
commitdda9e59a4a3ab471001998d0e68d67ab12b4ac69 (patch)
treead7b589d18aec83d4f09d0e64b75e1581c85589b /spec/support/fixture_file_helper.rb
parent93a00df11d79c9f59141ff42ce05ab3b3d329375 (diff)
parent93f7c568e1104936de011626d3bd7f56ebe66355 (diff)
Merge branch 'maven-airgap' into 'master'v3.7.0
Install certificate bundle. See merge request gitlab-org/security-products/license-management!126
Diffstat (limited to 'spec/support/fixture_file_helper.rb')
-rw-r--r--spec/support/fixture_file_helper.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/support/fixture_file_helper.rb b/spec/support/fixture_file_helper.rb
index fe11acd..5a9599f 100644
--- a/spec/support/fixture_file_helper.rb
+++ b/spec/support/fixture_file_helper.rb
@@ -1,6 +1,11 @@
module FixtureFileHelper
- def fixture_file_content(path)
- IO.read(fixture_file(path))
+ def fixture_file_content(path, data = {})
+ content = IO.read(fixture_file(path))
+ return content unless path.end_with?('.erb')
+
+ ERB
+ .new(content)
+ .result(OpenStruct.new(data).send(:binding))
end
def fixture_file(path)