Skip to content

Commit

Permalink
refactored delta implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfeathers committed May 19, 2011
1 parent 09be7ab commit ea055fa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion delta_spec.rb
Expand Up @@ -9,11 +9,18 @@
r.delta_for_commits('1a2', '3b4').removed_methods.count.should eq(0)
end

it "reports one when a method disappears between commits" do
it "reports 1 when a method disappears between commits" do
event = CodeEvent.new(commit: 'a', class_name: 'class_a', method_name: 'method_a')
r = RepoDepot::Repository.new('', [event])
r.delta_for_commits('a', 'b').removed_methods.count.should eq(1)
end

end

context "#added_methods" do
it "reports zero when commits are empty" do
r = RepoDepot::Repository.new('', [])
r.delta_for_commits('1a2', '3b4').removed_methods.count.should eq(0)
end
end
end

0 comments on commit ea055fa

Please sign in to comment.