From 565345e3b3ec92a537eece44d2d6654d16671126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mindaugas=20Moz=C5=ABras?= Date: Sun, 3 Aug 2014 16:06:36 +0300 Subject: [PATCH] Some specs for Git::Patch --- spec/pronto/git/patch_spec.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 spec/pronto/git/patch_spec.rb diff --git a/spec/pronto/git/patch_spec.rb b/spec/pronto/git/patch_spec.rb new file mode 100644 index 00000000..7a383d5f --- /dev/null +++ b/spec/pronto/git/patch_spec.rb @@ -0,0 +1,25 @@ +require 'spec_helper' + +module Pronto + module Git + describe Patch do + let(:patch) { Patch.new(rugged_patch, repo) } + + let(:repo) { nil } + + describe '#additions' do + subject { patch.additions } + + let(:rugged_patch) { double(stat: [15, 13]) } + it { should == 15 } + end + + describe '#deletions' do + subject { patch.deletions } + + let(:rugged_patch) { double(stat: [5, 17]) } + it { should == 17 } + end + end + end +end