Sha256: 7022af182e788808c6c9005b72e460bdc0740db7cf577d27324c3e84f01cb631

Contents?: true

Size: 556 Bytes

Versions: 4

Compression:

Stored size: 556 Bytes

Contents

require 'spec_helper'

require 'method_log/method_diff'

module MethodLog
  describe MethodDiff do
    let(:first_commit) { double(:first_commit) }
    let(:second_commit) { double(:second_commit) }
    let(:diff) { MethodDiff.new(first_commit, second_commit) }

    it 'generates text diff of the method source for two commits' do
      first_commit.stub(:method_source).and_return(%{line 1\nline 2\n})
      second_commit.stub(:method_source).and_return(%{line 2\nline 3\n})
      expect(diff.to_s).to eq(%{-line 1\n line 2\n+line 3\n})
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
method_log-0.1.1 spec/method_diff_spec.rb
method_log-0.1.0 spec/method_diff_spec.rb
method_log-0.0.7 spec/method_diff_spec.rb
method_log-0.0.6 spec/method_diff_spec.rb