Merge branch 'rs-markdown-feature-parity' into 'master'
Add fixture path argument to `MarkdownFeature.new` See merge request gitlab-org/gitlab-ce!21754
This commit is contained in:
commit
1d925e5cbf
1 changed files with 7 additions and 1 deletions
|
@ -10,6 +10,12 @@
|
|||
class MarkdownFeature
|
||||
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
|
||||
@user ||= create(:user)
|
||||
end
|
||||
|
@ -122,7 +128,7 @@ class MarkdownFeature
|
|||
end
|
||||
|
||||
def raw_markdown
|
||||
markdown = File.read(Rails.root.join('spec/fixtures/markdown.md.erb'))
|
||||
markdown = File.read(fixture_path)
|
||||
ERB.new(markdown).result(binding)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue