Skip to content

Commit

Permalink
Update rspec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
holzman committed Sep 7, 2011
1 parent cfca952 commit 17584f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/lib/git_commit_notifier/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
describe :show do
it "should get data from shell: git show without whitespaces" do
expected = 'some data from git show'
mock(GitCommitNotifier::Git).from_shell("git show #{SAMPLE_REV} -w") { expected }
mock(GitCommitNotifier::Git).from_shell("git show #{SAMPLE_REV} --pretty=fuller -w") { expected }
GitCommitNotifier::Git.show(SAMPLE_REV, true).should == expected
end

it "should get data from shell: git show with whitespaces" do
expected = 'some data from git show'
mock(GitCommitNotifier::Git).from_shell("git show #{SAMPLE_REV}") { expected }
mock(GitCommitNotifier::Git).from_shell("git show #{SAMPLE_REV} --pretty=fuller") { expected }
GitCommitNotifier::Git.show(SAMPLE_REV, false).should == expected
end

it "should strip given revision" do
mock(GitCommitNotifier::Git).from_shell("git show #{SAMPLE_REV} -w")
mock(GitCommitNotifier::Git).from_shell("git show #{SAMPLE_REV} --pretty=fuller -w")
GitCommitNotifier::Git.show("#{SAMPLE_REV}\n", true)
end
end
Expand Down Expand Up @@ -73,7 +73,7 @@

describe :log do
it "should run git log with given args" do
mock(GitCommitNotifier::Git).from_shell("git log #{SAMPLE_REV}..#{SAMPLE_REV_2}") { " ok " }
mock(GitCommitNotifier::Git).from_shell("git log --pretty=fuller #{SAMPLE_REV}..#{SAMPLE_REV_2}") { " ok " }
GitCommitNotifier::Git.log(SAMPLE_REV, SAMPLE_REV_2).should == "ok"
end
end
Expand Down

0 comments on commit 17584f0

Please sign in to comment.