aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/engine
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-08-11 20:24:48 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-08-11 20:54:23 +0900
commit6fc8b54621f67bc618885752626937a84785bbd6 (patch)
tree65d34217489db606a8820f210f19345a9767f399 /railties/test/engine
parent5cb6b887d410fcd1ea821b32374a17a94acdc413 (diff)
downloadrails-6fc8b54621f67bc618885752626937a84785bbd6.tar.gz
rails-6fc8b54621f67bc618885752626937a84785bbd6.tar.bz2
rails-6fc8b54621f67bc618885752626937a84785bbd6.zip
add missing require rake
In ff8035dfeed8c86594c32ef8e9204806e190cb58, require rake is deferred. Therefore, it is necessary to require rake even `Engine::CommandsTasks.
Diffstat (limited to 'railties/test/engine')
-rw-r--r--railties/test/engine/commands_tasks_test.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/railties/test/engine/commands_tasks_test.rb b/railties/test/engine/commands_tasks_test.rb
new file mode 100644
index 0000000000..817175b9ef
--- /dev/null
+++ b/railties/test/engine/commands_tasks_test.rb
@@ -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