Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26116 from y-yagi/fix_name_error_in_engine_comman…
…ds_tasks add missing require rake
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require "abstract_unit" | ||
|
||
class Rails::Engine::CommandsTasksTest < ActiveSupport::TestCase | ||
def setup | ||
@destination_root = Dir.mktmpdir("bukkits") | ||
Dir.chdir(@destination_root) { `bundle exec rails plugin new bukkits --mountable` } | ||
end | ||
|
||
def teardown | ||
FileUtils.rm_rf(@destination_root) | ||
end | ||
|
||
def test_help_command_work_inside_engine | ||
output = capture(:stderr) do | ||
Dir.chdir(plugin_path) { `bin/rails --help` } | ||
end | ||
assert_no_match "NameError", output | ||
end | ||
|
||
private | ||
def plugin_path | ||
"#{@destination_root}/bukkits" | ||
end | ||
end |