summaryrefslogtreecommitdiff
path: root/spec/support/fixture_file_helper.rb
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-09-14 16:40:00 -0600
committermo khan <mo.khan@gmail.com>2020-09-14 16:40:00 -0600
commit0dc0c0cec97cbdea04e278143e4711cfa0d3bd03 (patch)
treea650f1421d0e57b13024df1fb4efe5aa76b96dfb /spec/support/fixture_file_helper.rb
parentcea7d78e2d7f1a8f98880819b8589925b5daef1a (diff)
test: add spec to run gemnasium-maven scanner
Diffstat (limited to 'spec/support/fixture_file_helper.rb')
-rw-r--r--spec/support/fixture_file_helper.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/support/fixture_file_helper.rb b/spec/support/fixture_file_helper.rb
new file mode 100644
index 0000000..e5b8bde
--- /dev/null
+++ b/spec/support/fixture_file_helper.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module FixtureFileHelper
+ def fixture_file_content(path, data = {})
+ fixture_file(path).read
+ end
+
+ def fixture_file(path)
+ Pathname.pwd.join("spec/fixtures/#{path}")
+ end
+end
+
+RSpec.configure do |config|
+ config.include(FixtureFileHelper)
+end