From 9e97eadccbd99df1c6ffe489ab316d7ebde7fe86 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 12 Feb 2017 15:06:54 +0000 Subject: rubocop: trailing comma in multiline method calls Discussed in https://github.com/Homebrew/brew/pull/1987/files#r100693581. This was originally ommitted because it wasn't compatible with Ruby 1.8. (See https://github.com/Homebrew/legacy-homebrew/pull/48144#r49928971). --- Library/Homebrew/test/dependency_expansion_test.rb | 2 +- Library/Homebrew/test/formula_test.rb | 4 ++-- Library/Homebrew/test/language_python_test.rb | 4 ++-- Library/Homebrew/test/patch_test.rb | 10 +++++----- Library/Homebrew/test/shell_test.rb | 2 +- .../test/support/helper/integration_command_test_case.rb | 2 +- Library/Homebrew/test/tab_test.rb | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) (limited to 'Library/Homebrew/test') diff --git a/Library/Homebrew/test/dependency_expansion_test.rb b/Library/Homebrew/test/dependency_expansion_test.rb index de743ce03..58a731121 100644 --- a/Library/Homebrew/test/dependency_expansion_test.rb +++ b/Library/Homebrew/test/dependency_expansion_test.rb @@ -93,7 +93,7 @@ class DependencyExpansionTests < Homebrew::TestCase deps: [ build_dep(:foo, [], [@bar, @baz]), build_dep(:foo, [], [@baz]), - ] + ], ) deps = Dependency.expand(f) do |_dependent, dep| diff --git a/Library/Homebrew/test/formula_test.rb b/Library/Homebrew/test/formula_test.rb index f7b06b079..318175d49 100644 --- a/Library/Homebrew/test/formula_test.rb +++ b/Library/Homebrew/test/formula_test.rb @@ -209,12 +209,12 @@ class FormulaTests < Homebrew::TestCase refute_predicate f, :installed? f.stubs(:installed_prefix).returns( - stub(directory?: true, children: []) + stub(directory?: true, children: []), ) refute_predicate f, :installed? f.stubs(:installed_prefix).returns( - stub(directory?: true, children: [stub]) + stub(directory?: true, children: [stub]), ) assert_predicate f, :installed? end diff --git a/Library/Homebrew/test/language_python_test.rb b/Library/Homebrew/test/language_python_test.rb index aa0a7d51d..cc21cbfbd 100644 --- a/Library/Homebrew/test/language_python_test.rb +++ b/Library/Homebrew/test/language_python_test.rb @@ -17,7 +17,7 @@ class LanguagePythonTests < Homebrew::TestCase def test_virtualenv_creation @formula.expects(:resource).with("homebrew-virtualenv").returns( - mock("resource", stage: true) + mock("resource", stage: true), ) @venv.create end @@ -25,7 +25,7 @@ class LanguagePythonTests < Homebrew::TestCase # or at least doesn't crash the second time def test_virtualenv_creation_is_idempotent @formula.expects(:resource).with("homebrew-virtualenv").returns( - mock("resource", stage: true) + mock("resource", stage: true), ) @venv.create FileUtils.mkdir_p @dir/"bin" diff --git a/Library/Homebrew/test/patch_test.rb b/Library/Homebrew/test/patch_test.rb index f5a61398a..3055eaf48 100644 --- a/Library/Homebrew/test/patch_test.rb +++ b/Library/Homebrew/test/patch_test.rb @@ -48,7 +48,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 @@ -58,7 +58,7 @@ class LegacyPatchTests < Homebrew::TestCase def test_p0_hash_to_string patches = Patch.normalize_legacy_patches( - p0: "http://example.com/patch.diff" + p0: "http://example.com/patch.diff", ) assert_equal 1, patches.length @@ -67,7 +67,7 @@ class LegacyPatchTests < Homebrew::TestCase def test_p1_hash_to_string patches = Patch.normalize_legacy_patches( - p1: "http://example.com/patch.diff" + p1: "http://example.com/patch.diff", ) assert_equal 1, patches.length @@ -77,7 +77,7 @@ class LegacyPatchTests < Homebrew::TestCase def test_mixed_hash_to_strings patches = Patch.normalize_legacy_patches( p1: "http://example.com/patch1.diff", - p0: "http://example.com/patch0.diff" + p0: "http://example.com/patch0.diff", ) assert_equal 2, patches.length assert_equal 1, patches.count { |p| p.strip == :p0 } @@ -89,7 +89,7 @@ class LegacyPatchTests < Homebrew::TestCase p1: ["http://example.com/patch10.diff", "http://example.com/patch11.diff"], p0: ["http://example.com/patch00.diff", - "http://example.com/patch01.diff"] + "http://example.com/patch01.diff"], ) assert_equal 4, patches.length diff --git a/Library/Homebrew/test/shell_test.rb b/Library/Homebrew/test/shell_test.rb index a04ab8331..970489702 100644 --- a/Library/Homebrew/test/shell_test.rb +++ b/Library/Homebrew/test/shell_test.rb @@ -42,7 +42,7 @@ class ShellSmokeTest < Homebrew::TestCase prepend_message = Utils::Shell.prepend_path_in_shell_profile(path) assert( prepend_message.start_with?(fragment), - "#{shell}: expected #{prepend_message} to match #{fragment}" + "#{shell}: expected #{prepend_message} to match #{fragment}", ) end diff --git a/Library/Homebrew/test/support/helper/integration_command_test_case.rb b/Library/Homebrew/test/support/helper/integration_command_test_case.rb index 45e73757a..7ba094645 100644 --- a/Library/Homebrew/test/support/helper/integration_command_test_case.rb +++ b/Library/Homebrew/test/support/helper/integration_command_test_case.rb @@ -35,7 +35,7 @@ class IntegrationCommandTestCase < Homebrew::TestCase "HOMEBREW_BREW_FILE" => HOMEBREW_PREFIX/"bin/brew", "HOMEBREW_INTEGRATION_TEST" => cmd_id_from_args(args), "HOMEBREW_TEST_TMPDIR" => TEST_TMPDIR, - "HOMEBREW_DEVELOPER" => ENV["HOMEBREW_DEVELOPER"] + "HOMEBREW_DEVELOPER" => ENV["HOMEBREW_DEVELOPER"], ) ruby_args = [ diff --git a/Library/Homebrew/test/tab_test.rb b/Library/Homebrew/test/tab_test.rb index 99c95a3f0..08d45ee90 100644 --- a/Library/Homebrew/test/tab_test.rb +++ b/Library/Homebrew/test/tab_test.rb @@ -32,7 +32,7 @@ class TabTests < Homebrew::TestCase "devel" => "0.14", "head" => "HEAD-1111111", }, - } + }, ) end -- cgit v1.2.3