Welcome to mirror list, hosted at ThFree Co, Russian Federation.

file_spec.rb « diff « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cf0b5c282c1d7a75195dbb921f7708d497e68180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'spec_helper'

describe Gitlab::Diff::File do
  include RepoHelpers

  let(:project) { create(:project) }
  let(:commit) { project.repository.commit(sample_commit.id) }
  let(:diff) { commit.diffs.first }
  let(:diff_file) { Gitlab::Diff::File.new(diff) }

  describe :diff_lines do
    let(:diff_lines) { diff_file.diff_lines }

    it { diff_lines.size.should == 30 }
    it { diff_lines.first.should be_kind_of(Gitlab::Diff::Line) }
  end

  describe :mode_changed? do
    it { diff_file.mode_changed?.should be_false }
  end
end