Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo'd command class name #16935

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -53,4 +53,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