diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-09-17 17:22:47 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-09-17 17:22:47 +0000 |
commit | 1d925e5cbf7ed7902dc5cbcb18b7d61a6cac57e6 (patch) | |
tree | 9c525b20f6d659229a872d7a37c58e1a583a1c39 | |
parent | ba7f64080cc81314f6a000758aa8c572f3696322 (diff) | |
parent | 38f8f4e9fe06c0e2733e9dbab25118a0eed4eb02 (diff) | |
download | gitlab-ce-1d925e5cbf7ed7902dc5cbcb18b7d61a6cac57e6.tar.gz |
Merge branch 'rs-markdown-feature-parity' into 'master'
Add fixture path argument to `MarkdownFeature.new`
See merge request gitlab-org/gitlab-ce!21754
-rw-r--r-- | spec/support/helpers/markdown_feature.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/support/helpers/markdown_feature.rb b/spec/support/helpers/markdown_feature.rb index 346f5b1cc4d..96401379cf0 100644 --- a/spec/support/helpers/markdown_feature.rb +++ b/spec/support/helpers/markdown_feature.rb @@ -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 |