diff options
author | http://jneen.net/ <jneen@jneen.net> | 2016-06-11 01:42:43 +0300 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2016-06-28 00:17:49 +0300 |
commit | f8b80f7faedef7515d05abd9a5cc315d98724ae3 (patch) | |
tree | 9f0079320c6edbf2ded9221960d2f71e1aca5053 /spec/lib/gitlab/highlight_spec.rb | |
parent | 0fd4b9d3e2c800e728e17e919fa7369b3322c65b (diff) |
add custom highlighting via .gitattributes
paired with @stanhu
Diffstat (limited to 'spec/lib/gitlab/highlight_spec.rb')
-rw-r--r-- | spec/lib/gitlab/highlight_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/highlight_spec.rb b/spec/lib/gitlab/highlight_spec.rb index 1620eb6c60a..303943606ff 100644 --- a/spec/lib/gitlab/highlight_spec.rb +++ b/spec/lib/gitlab/highlight_spec.rb @@ -18,4 +18,14 @@ describe Gitlab::Highlight, lib: true do end end + describe 'custom highlighting from .gitattributes' do + let(:blob) { project.blob_at_branch('master', 'custom-highlighting/test.gitlab-custom') } + let(:highlighter) { + Gitlab::Highlight.new(blob.path, blob.contents, repository: project.repository) + } + + it 'highlights as ruby' do + expect(highlighter.lexer).to be_an_instance_of Rouge::Lexers::Ruby + end + end end |