aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorJack Nagel2014-07-18 15:14:42 -0500
committerJack Nagel2014-07-18 15:14:57 -0500
commit03fdaecee7632722e93edef2322b9d9ce629de86 (patch)
treee5f8faf90f2b72c8ed592d917f55db1eba9e2ee4 /Library/Homebrew/test
parent8eac19abd1165d677b45e7110335204d4abda6ef (diff)
downloadhomebrew-03fdaecee7632722e93edef2322b9d9ce629de86.tar.bz2
Move bottle filename construction to a class
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_bottle_filename.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_bottle_filename.rb b/Library/Homebrew/test/test_bottle_filename.rb
new file mode 100644
index 000000000..09dc29e5f
--- /dev/null
+++ b/Library/Homebrew/test/test_bottle_filename.rb
@@ -0,0 +1,14 @@
+require "testing_env"
+require "software_spec"
+
+class BottleFilenameTests < Homebrew::TestCase
+ def fn(revision)
+ Bottle::Filename.new("foo", "1.0", :tag, revision)
+ end
+
+ def test_to_str
+ expected = "foo-1.0.tag.bottle.tar.gz"
+ assert_equal expected, fn(0).to_s
+ assert_equal expected, fn(0).to_str
+ end
+end