Skip to content

Commit 5c8289a

Browse files
committed
Update specs
1 parent 2477ae2 commit 5c8289a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

spec/lib/git_commit_notifier/commit_hook_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def run_with_config(config, times, branch = 'refs/heads/master')
4949

5050
def run_and_reject(config,times,branch)
5151
mock(GitCommitNotifier::Git).mailing_list_address { 'recipient@test.com' }
52+
mock(GitCommitNotifier::Git).repo_name { 'testproject' }
5253

5354
emailer = mock!.send.times(times).subject
5455
mock(GitCommitNotifier::Emailer).new(anything, anything).times(times)
@@ -71,6 +72,8 @@ def test_commit_from
7172
def expect_repository_access
7273
mock(GitCommitNotifier::Git).log(REVISIONS.first, REVISIONS.last) { IO.read(FIXTURES_PATH + 'git_log') }
7374
mock(GitCommitNotifier::Git).mailing_list_address { 'recipient@test.com' }
75+
mock(GitCommitNotifier::Git).repo_name { 'testproject' }
76+
mock(GitCommitNotifier::Git).changed_files('7e4f6b4', '4f13525') { [] }
7477
REVISIONS.each do |rev|
7578
mock(GitCommitNotifier::Git).show(rev, true) { IO.read(FIXTURES_PATH + "git_show_#{rev}") }
7679
end

spec/lib/git_commit_notifier/diff_to_html_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
end
127127

128128
it "multiple commits" do
129+
mock(GitCommitNotifier::Git).changed_files('7e4f6b4', '4f13525') { [] }
129130
mock(GitCommitNotifier::Git).log(REVISIONS.first, REVISIONS.last) { IO.read(FIXTURES_PATH + 'git_log') }
130131
REVISIONS.each do |rev|
131132
mock(GitCommitNotifier::Git).show(rev, true) { IO.read(FIXTURES_PATH + 'git_show_' + rev) }

0 commit comments

Comments
 (0)