aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/utils/bottles
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-16 21:17:46 +0100
committerMarkus Reiter2017-02-19 18:41:53 +0100
commit05a98f24c4d21b3a3c7fcb4045e74619a4628f4c (patch)
tree4b48a58a7d392fc963681745c445a9cf2dc49e8f /Library/Homebrew/test/utils/bottles
parent9f31d41fb263718bff98e194df411b8aaea72aba (diff)
downloadbrew-05a98f24c4d21b3a3c7fcb4045e74619a4628f4c.tar.bz2
Convert Utils test to spec.
Diffstat (limited to 'Library/Homebrew/test/utils/bottles')
-rw-r--r--Library/Homebrew/test/utils/bottles/bintray_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/test/utils/bottles/bintray_spec.rb b/Library/Homebrew/test/utils/bottles/bintray_spec.rb
new file mode 100644
index 000000000..a7dfc00ea
--- /dev/null
+++ b/Library/Homebrew/test/utils/bottles/bintray_spec.rb
@@ -0,0 +1,18 @@
+require "utils/bottles"
+
+describe Utils::Bottles::Bintray do
+ describe "::package" do
+ it "converts a Formula name to a package name" do
+ expect(described_class.package("openssl@1.1")).to eq("openssl:1.1")
+ expect(described_class.package("gtk+")).to eq("gtkx")
+ expect(described_class.package("llvm")).to eq("llvm")
+ end
+ end
+
+ describe "::repository" do
+ it "returns the repository for a given Tap" do
+ expect(described_class.repository(Tap.new("homebrew", "bintray-test")))
+ .to eq("bottles-bintray-test")
+ end
+ end
+end