Skip to content

Commit

Permalink
Merge pull request #16935 from Homebrew/fix-typo-class
Browse files Browse the repository at this point in the history
Fix typo'd command class name
  • Loading branch information
Bo98 authored Mar 22, 2024
2 parents 1a62a63 + 1db309f commit d704e00
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/bump-unversioned-casks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

module Homebrew
module DevCmd
class BumpUnversionedCask < AbstractCommand
class BumpUnversionedCasks < AbstractCommand
include SystemCommand::Mixin

cmd_args do
Expand Down
17 changes: 17 additions & 0 deletions Library/Homebrew/test/abstract_command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,21 @@ def run; end
end
end
end

describe "command paths" do
it "match command name" do
# Ensure all commands are loaded
["cmd", "dev-cmd"].each do |dir|
Dir[File.join(__dir__, "../#{dir}", "*.rb")].each { require(_1) }
end
test_classes = ["Cat", "Tac"]

described_class.subclasses.each do |klass|
next if test_classes.include?(klass.name)

dir = klass.name.start_with?("Homebrew::DevCmd") ? "dev-cmd" : "cmd"
expect(Pathname(File.join(__dir__, "../#{dir}/#{klass.command_name}.rb"))).to exist
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
require "cmd/shared_examples/args_parse"
require "dev-cmd/bump-unversioned-casks"

RSpec.describe Homebrew::DevCmd::BumpUnversionedCask do
RSpec.describe Homebrew::DevCmd::BumpUnversionedCasks do
it_behaves_like "parseable arguments", argv: ["foo"]
end

0 comments on commit d704e00

Please sign in to comment.