From e69a0e34494de8d91f53c0e1647690a8775a9536 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Fri, 24 Feb 2017 09:17:13 +0900 Subject: Make help short-cut alias to work --- railties/test/application/help_test.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 railties/test/application/help_test.rb (limited to 'railties/test') diff --git a/railties/test/application/help_test.rb b/railties/test/application/help_test.rb new file mode 100644 index 0000000000..0c3fe8bfa3 --- /dev/null +++ b/railties/test/application/help_test.rb @@ -0,0 +1,23 @@ +require "isolation/abstract_unit" + +class HelpTest < ActiveSupport::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + end + + def teardown + teardown_app + end + + test "command works" do + output = Dir.chdir(app_path) { `bin/rails help` } + assert_match "The most common rails commands are", output + end + + test "short-cut alias works" do + output = Dir.chdir(app_path) { `bin/rails -h` } + assert_match "The most common rails commands are", output + end +end -- cgit v1.2.3