debian-mirror-gitlab/spec/lib/gitlab/git/patches/patch_spec.rb

18 lines
458 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::Git::Patches::Patch do
2018-12-13 13:39:08 +05:30
let(:patches_folder) { Rails.root.join('spec/fixtures/patchfiles') }
let(:patch_content) do
File.read(File.join(patches_folder, "0001-This-does-not-apply-to-the-feature-branch.patch"))
end
2020-10-24 23:57:45 +05:30
2018-12-13 13:39:08 +05:30
let(:patch) { described_class.new(patch_content) }
describe '#size' do
it 'is correct' do
expect(patch.size).to eq(549.bytes)
end
end
end