File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 94
94
end
95
95
end
96
96
97
- context "with unexpected options" do
98
- it "should raise" do
97
+ context "with bad arguments" do
98
+
99
+ it "should raise UsageError with empty arguments" do
100
+ expect { venom . parse_args ( [ ] ) } . to raise_error ( MsfVenom ::UsageError )
101
+ end
102
+
103
+ it "should raise with unexpected options" do
99
104
expect { venom . parse_args ( %w! --non-existent-option ! ) } . to raise_error ( MsfVenom ::UsageError )
100
105
end
101
- end
102
106
103
- context "with missing required arg" do
104
107
%w! --platform -a -b -c -f -p -n -s -i -x ! . each do |required_arg |
105
- it "#{ required_arg } should raise " do
108
+ it "should raise UsageError with no arg for option #{ required_arg } " do
106
109
expect { venom . parse_args ( [ required_arg ] ) } . to raise_error ( MsfVenom ::UsageError )
107
110
end
108
111
end
112
+
109
113
end
110
114
111
115
end
You can’t perform that action at this time.
0 commit comments