Skip to content

Commit

Permalink
add AnnotateRb::Parser spec
Browse files Browse the repository at this point in the history
  • Loading branch information
OdenTakashi committed Jan 21, 2025
1 parent d83eac1 commit 31da0e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/lib/annotate_rb/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ module AnnotateRb # rubocop:disable Metrics/ModuleLength
expect(result).to include(command: instance_of(Commands::PrintVersion))
end
end

context "when given multiple commands" do
let(:model_command_option) { "models" }
let(:version_command_option) { "--version" }
let(:args) { [model_command_option, version_command_option] }

it "displays a warning to stderr" do
expect { result }.to output("Only one command can be run at a time\n").to_stderr
end
end
end

context "when given empty args" do
Expand Down

0 comments on commit 31da0e7

Please sign in to comment.