aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_patch.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-29 16:06:07 -0500
committerJack Nagel2014-07-29 16:22:06 -0500
commit893775c7b4df963ee68d8f4f46bbe2e644768b02 (patch)
tree5988635c715e8cca1766674cb45cbbec986d9af1 /Library/Homebrew/test/test_patch.rb
parentf3cb1d2b0614e3dcfe2e2911e65bfd24511a2fc2 (diff)
downloadhomebrew-893775c7b4df963ee68d8f4f46bbe2e644768b02.tar.bz2
Simplify internal representation of patches
- remove support for IO objects, since we no longer access ::DATA directly - since we don't need to support IO objects, use a separate class for string patches and stop wrapping strings in StringIO ojects
Diffstat (limited to 'Library/Homebrew/test/test_patch.rb')
-rw-r--r--Library/Homebrew/test/test_patch.rb17
1 files changed, 2 insertions, 15 deletions
diff --git a/Library/Homebrew/test/test_patch.rb b/Library/Homebrew/test/test_patch.rb
index 4b8cdf53c..a70d581d8 100644
--- a/Library/Homebrew/test/test_patch.rb
+++ b/Library/Homebrew/test/test_patch.rb
@@ -9,28 +9,15 @@ class PatchTests < Homebrew::TestCase
assert_equal :p2, patch.strip
end
- def test_create_io
- patch = Patch.create(:p0, StringIO.new("foo"))
- assert_kind_of IOPatch, patch
- refute_predicate patch, :external?
- assert_equal :p0, patch.strip
- end
-
- def test_create_io_without_strip
- patch = Patch.create(StringIO.new("foo"), nil)
- assert_kind_of IOPatch, patch
- assert_equal :p1, patch.strip
- end
-
def test_create_string
patch = Patch.create(:p0, "foo")
- assert_kind_of IOPatch, patch
+ assert_kind_of StringPatch, patch
assert_equal :p0, patch.strip
end
def test_create_string_without_strip
patch = Patch.create("foo", nil)
- assert_kind_of IOPatch, patch
+ assert_kind_of StringPatch, patch
assert_equal :p1, patch.strip
end