We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5e77c4 commit 089c30eCopy full SHA for 089c30e
spec/thor_spec.rb
@@ -422,6 +422,23 @@ def shell
422
expect(capture(:stdout) { MyScript.start(%w[help foo]) }).to match(/Usage:/)
423
end
424
425
+
426
+ context "with required class_options" do
427
+ let(:klass) do
428
+ Class.new(Thor) do
429
+ class_option :foo, :required => true
430
431
+ desc "bar", "do something"
432
+ def bar
433
+ end
434
435
436
437
+ it "shows the command help" do
438
+ content = capture(:stdout) { klass.start(%w{help}) }
439
+ expect(content).to match(/Commands:/)
440
441
442
443
444
describe "when creating commands" do
0 commit comments