From 7d131de57dac25dbb7cf9a8f986c291de87f7e65 Mon Sep 17 00:00:00 2001
From: Markus Reiter <me@reitermark.us>
Date: Mon, 23 Jan 2017 12:01:47 +0000
Subject: [PATCH] tests: slightly stricter match in tab test

Suggested by @reitermarkus in
https://github.com/Homebrew/brew/pull/1890#discussion_r97234536, and
then I added the \A and \Z.
---
 Library/Homebrew/test/tap_test.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Library/Homebrew/test/tap_test.rb b/Library/Homebrew/test/tap_test.rb
index 9979be43d4..578326cea8 100644
--- a/Library/Homebrew/test/tap_test.rb
+++ b/Library/Homebrew/test/tap_test.rb
@@ -177,7 +177,7 @@ class TapTest < Homebrew::TestCase
 
     assert_equal "0453e16c8e3fac73104da50927a86221ca0740c2", @tap.git_head
     assert_equal "0453", @tap.git_short_head
-    assert_match "ago", @tap.git_last_commit
+    assert_match(/\A\d+ .+ ago\Z/, @tap.git_last_commit)
     assert_equal "2017-01-22", @tap.git_last_commit_date
   end
 
-- 
GitLab