Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Use better formatting for error message.
Browse files Browse the repository at this point in the history
[#26437795]
  • Loading branch information
stevenharman committed Mar 23, 2012
1 parent 1b0cf83 commit f90cc89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/git_tracker.rb
Expand Up @@ -4,7 +4,7 @@
module GitTracker
def self.execute(hook, *args)
hook_name = hook.gsub(/-/, '_')
abort("git-tracker #{hook} does not exist.") unless respond_to?(hook_name)
abort("[git_tracker] hook: '#{hook}' does not exist.") unless respond_to?(hook_name)
send(hook_name, *args)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/git_tracker_spec.rb
Expand Up @@ -12,7 +12,7 @@
# TODO: stop the abort from writing to stderr during tests?
it "doesn't run hooks we don't know about" do
lambda { GitTracker.execute('non-existent-hook', *args) }.
should raise_error SystemExit, "git-tracker non-existent-hook does not exist."
should raise_error SystemExit, "[git_tracker] hook: 'non-existent-hook' does not exist."
end
end

Expand Down

0 comments on commit f90cc89

Please sign in to comment.