aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/utils_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/utils_spec.rb')
-rw-r--r--Library/Homebrew/test/utils_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/test/utils_spec.rb b/Library/Homebrew/test/utils_spec.rb
index dd7ea20de..5f370a040 100644
--- a/Library/Homebrew/test/utils_spec.rb
+++ b/Library/Homebrew/test/utils_spec.rb
@@ -270,4 +270,12 @@ describe "globally-scoped helper methods" do
}.to raise_error(MethodDeprecatedError, %r{method.*replacement.*homebrew/homebrew-core.*homebrew/core}m)
end
end
+
+ describe "#puts_hash" do
+ it "outputs a hash" do
+ expect {
+ puts_hash(a: 1, b: 2, c: [3, { "d"=>4 }])
+ }.to output("a: 1\nb: 2\nc: [3, {\"d\"=>4}]\n").to_stdout
+ end
+ end
end