gitlab-org--gitlab-foss/spec/lib/gitlab/git/blob_snippet_spec.rb
2017-01-04 19:09:28 -05:00

19 lines
475 B
Ruby

# encoding: UTF-8
require "spec_helper"
describe Gitlab::Git::BlobSnippet, seed_helper: true do
describe :data do
context 'empty lines' do
let(:snippet) { Gitlab::Git::BlobSnippet.new('master', nil, nil, nil) }
it { expect(snippet.data).to be_nil }
end
context 'present lines' do
let(:snippet) { Gitlab::Git::BlobSnippet.new('master', ['wow', 'much'], 1, 'wow.rb') }
it { expect(snippet.data).to eq("wow\nmuch") }
end
end
end