File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,14 @@ module Spring
1414 module Client
1515 COMMANDS = {
1616 "help" => Client ::Help ,
17+ "-h" => Client ::Help ,
18+ "--help" => Client ::Help ,
1719 "binstub" => Client ::Binstub ,
1820 "stop" => Client ::Stop ,
1921 "status" => Client ::Status ,
2022 "rails" => Client ::Rails ,
2123 "-v" => Client ::Version ,
22- "--version" => Client ::Version
24+ "--version" => Client ::Version ,
2325 }
2426
2527 def self . run ( args )
Original file line number Diff line number Diff line change @@ -84,6 +84,14 @@ def without_gem(name)
8484
8585 test "help message when called without arguments" do
8686 assert_success "bin/spring" , stdout : 'Usage: spring COMMAND [ARGS]'
87+ assert app . spring_env . server_running?
88+ end
89+
90+ test "shows help" do
91+ assert_success "bin/spring help" , stdout : 'Usage: spring COMMAND [ARGS]'
92+ assert_success "bin/spring -h" , stdout : 'Usage: spring COMMAND [ARGS]'
93+ assert_success "bin/spring --help" , stdout : 'Usage: spring COMMAND [ARGS]'
94+ refute app . spring_env . server_running?
8795 end
8896
8997 test "test changes are picked up" do
You can’t perform that action at this time.
0 commit comments