aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/version_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/version_spec.rb')
-rw-r--r--Library/Homebrew/test/version_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Homebrew/test/version_spec.rb b/Library/Homebrew/test/version_spec.rb
index cee57e935..6d6996316 100644
--- a/Library/Homebrew/test/version_spec.rb
+++ b/Library/Homebrew/test/version_spec.rb
@@ -241,8 +241,18 @@ describe Version do
describe "::detect" do
matcher :be_detected_from do |url, specs = {}|
- match do |version|
- Version.detect(url, specs) == version
+ detected = Version.detect(url, specs)
+
+ match do |expected|
+ detected == expected
+ end
+
+ failure_message do |expected|
+ format = <<-EOS
+ expected: %s
+ detected: %s
+ EOS
+ format % [expected, detected]
end
end