Commit 1d925e5c authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'rs-markdown-feature-parity' into 'master'

Add fixture path argument to `MarkdownFeature.new`

See merge request gitlab-org/gitlab-ce!21754
parents ba7f6408 38f8f4e9
...@@ -10,6 +10,12 @@ ...@@ -10,6 +10,12 @@
class MarkdownFeature class MarkdownFeature
include FactoryBot::Syntax::Methods include FactoryBot::Syntax::Methods
attr_reader :fixture_path
def initialize(fixture_path = Rails.root.join('spec/fixtures/markdown.md.erb'))
@fixture_path = fixture_path
end
def user def user
@user ||= create(:user) @user ||= create(:user)
end end
...@@ -122,7 +128,7 @@ class MarkdownFeature ...@@ -122,7 +128,7 @@ class MarkdownFeature
end end
def raw_markdown def raw_markdown
markdown = File.read(Rails.root.join('spec/fixtures/markdown.md.erb')) markdown = File.read(fixture_path)
ERB.new(markdown).result(binding) ERB.new(markdown).result(binding)
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment