Skip to content

Commit 226aaa7

Browse files
committed
100% coverage
1 parent 294044c commit 226aaa7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

spec/approvals/cli/add/comp-error

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#<Bashly::Error: Unrecognized format: no-such-format>

spec/bashly/commands/add_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@
125125
expect(File.read "#{source_dir}/lib/send_completions.sh").to match_approval('cli/add/comp-function-file')
126126
end
127127
end
128+
129+
context "with an unrecognized subcommand" do
130+
it "raises an error" do
131+
expect { subject.run %w[add comp no-such-format] }.to raise_approval('cli/add/comp-error')
132+
end
133+
end
128134
end
129135

130136
end

0 commit comments

Comments
 (0)