Commit fc580935 authored by Sean McGivern's avatar Sean McGivern

Keep #absolute_image_urls as a private instance method

parent 1e2c28ab
......@@ -17,7 +17,9 @@ module Gitlab
@object = object
end
def self.absolute_image_urls(markdown_text)
private
def absolute_image_urls(markdown_text)
return markdown_text unless markdown_text.present?
markdown_text.gsub(MARKDOWN_SIMPLE_IMAGE) do
......@@ -31,12 +33,6 @@ module Gitlab
end
end
end
private
def absolute_image_urls(markdown_text)
self.class.absolute_image_urls(markdown_text)
end
end
end
end
require 'spec_helper'
describe Gitlab::HookData::BaseBuilder do
describe '.absolute_image_urls' do
describe '#absolute_image_urls' do
let(:subclass) do
Class.new(described_class) do
public :absolute_image_urls
end
end
subject { subclass.new(nil) }
using RSpec::Parameterized::TableSyntax
where do
......@@ -50,7 +58,7 @@ describe Gitlab::HookData::BaseBuilder do
end
with_them do
it { expect(described_class.absolute_image_urls(input)).to eq(output) }
it { expect(subject.absolute_image_urls(input)).to eq(output) }
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