File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ def parse_command(command)
103103 end
104104
105105 def rake_tasks
106+ require_rake
107+
106108 return @rake_tasks if defined? ( @rake_tasks )
107109
108110 load_generators
Original file line number Diff line number Diff line change 1+ require "abstract_unit"
2+
3+ class Rails ::Engine ::CommandsTasksTest < ActiveSupport ::TestCase
4+ def setup
5+ @destination_root = Dir . mktmpdir ( "bukkits" )
6+ Dir . chdir ( @destination_root ) { `bundle exec rails plugin new bukkits --mountable` }
7+ end
8+
9+ def teardown
10+ FileUtils . rm_rf ( @destination_root )
11+ end
12+
13+ def test_help_command_work_inside_engine
14+ output = capture ( :stderr ) do
15+ Dir . chdir ( plugin_path ) { `bin/rails --help` }
16+ end
17+ assert_no_match "NameError" , output
18+ end
19+
20+ private
21+ def plugin_path
22+ "#{ @destination_root } /bukkits"
23+ end
24+ end
You can’t perform that action at this time.
0 commit comments