Skip to content

Commit

Permalink
Output a usage string of NUM for Integer params.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Jan 4, 2024
1 parent d6e22c9 commit bf95613
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/ronin/core/cli/printing/params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def print_params(klass)
def param_usage(param)
case param.type
when Core::Params::Types::Boolean then 'BOOL'
when Core::Params::Types::Integer then 'INT'
when Core::Params::Types::Integer then 'NUM'
when Core::Params::Types::Float then 'FLOAT'
when Core::Params::Types::Regexp then '/REGEX/'
when Core::Params::Types::URI then 'URL'
Expand Down
4 changes: 2 additions & 2 deletions spec/cli/printing/params_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ class TestCommand < Ronin::Core::CLI::Command
context "when given a param with an Integer type" do
let(:type) { Ronin::Core::Params::Types::Integer.new }

it "must return 'INT'" do
expect(subject.param_usage(param)).to eq('INT')
it "must return 'NUM'" do
expect(subject.param_usage(param)).to eq('NUM')
end
end

Expand Down

0 comments on commit bf95613

Please sign in to comment.