Sha256: 3a4341a2217033a2b3237f91d30a1faa48510b5adaa394bb85cc8ae22f35a8c5
Contents?: true
Size: 582 Bytes
Versions: 2
Compression:
Stored size: 582 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 allow(first_commit).to receive(:method_source).and_return(%{line 1\nline 2\n}) allow(second_commit).to receive(: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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
method_log-0.2.1 | spec/method_diff_spec.rb |
method_log-0.2.0 | spec/method_diff_spec.rb |