From 13d544e11e92ba8ea3788723432046f8dfe4adf9 Mon Sep 17 00:00:00 2001 From: BrewTestBot Date: Mon, 3 Aug 2015 13:09:07 +0100 Subject: Core files style updates. Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid --- Library/Homebrew/test/test_patch.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Library/Homebrew/test/test_patch.rb') diff --git a/Library/Homebrew/test/test_patch.rb b/Library/Homebrew/test/test_patch.rb index a70d581d8..214955ef1 100644 --- a/Library/Homebrew/test/test_patch.rb +++ b/Library/Homebrew/test/test_patch.rb @@ -1,5 +1,5 @@ -require 'testing_env' -require 'patch' +require "testing_env" +require "patch" class PatchTests < Homebrew::TestCase def test_create_simple @@ -47,7 +47,7 @@ class LegacyPatchTests < Homebrew::TestCase def test_patch_array patches = Patch.normalize_legacy_patches( - %w{http://example.com/patch1.diff http://example.com/patch2.diff} + %w[http://example.com/patch1.diff http://example.com/patch2.diff] ) assert_equal 2, patches.length @@ -79,8 +79,8 @@ class LegacyPatchTests < Homebrew::TestCase :p0 => "http://example.com/patch0.diff" ) assert_equal 2, patches.length - assert_equal 1, patches.select { |p| p.strip == :p0 }.length - assert_equal 1, patches.select { |p| p.strip == :p1 }.length + assert_equal 1, patches.count { |p| p.strip == :p0 } + assert_equal 1, patches.count { |p| p.strip == :p1 } end def test_mixed_hash_to_arrays @@ -92,8 +92,8 @@ class LegacyPatchTests < Homebrew::TestCase ) assert_equal 4, patches.length - assert_equal 2, patches.select { |p| p.strip == :p0 }.length - assert_equal 2, patches.select { |p| p.strip == :p1 }.length + assert_equal 2, patches.count { |p| p.strip == :p0 } + assert_equal 2, patches.count { |p| p.strip == :p1 } end def test_nil -- cgit v1.2.3