diff options
author | Dermot Haughey <hderms@gmail.com> | 2015-05-27 18:48:24 -0500 |
---|---|---|
committer | Dermot Haughey <hderms@gmail.com> | 2015-05-27 19:24:47 -0500 |
commit | ae5c3c3514f68fa89f190b7fa14a1006ebe76f23 (patch) | |
tree | ca8fe465e8eac5cc30e03aa61a1219b115b5f357 /railties/test/application/rake | |
parent | 3e36db4406beea32772b1db1e9a16cc1e8aea14c (diff) | |
download | rails-ae5c3c3514f68fa89f190b7fa14a1006ebe76f23.tar.gz rails-ae5c3c3514f68fa89f190b7fa14a1006ebe76f23.tar.bz2 rails-ae5c3c3514f68fa89f190b7fa14a1006ebe76f23.zip |
add fixed file
add framework_test
add another test
Diffstat (limited to 'railties/test/application/rake')
-rw-r--r-- | railties/test/application/rake/framework_test.rb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/railties/test/application/rake/framework_test.rb b/railties/test/application/rake/framework_test.rb new file mode 100644 index 0000000000..d2c2ae2fa0 --- /dev/null +++ b/railties/test/application/rake/framework_test.rb @@ -0,0 +1,46 @@ +require "isolation/abstract_unit" +require "active_support/core_ext/string/strip" + +module ApplicationTests + module RakeTests + class FrameworkTest < ActiveSupport::TestCase + include ActiveSupport::Testing::Isolation + + + def setup + build_app + boot_rails + FileUtils.rm_rf("#{app_path}/config/environments") + end + + def teardown + teardown_app + end + + def load_tasks + require 'rake' + require 'rdoc/task' + require 'rake/testtask' + + Rails.application.load_tasks + end + + test 'requiring the rake task should not define method .app_generator on Object' do + require "#{app_path}/config/environment" + load_tasks + assert_raise NameError do + Object.method(:app_generator) + end + end + + test 'requiring the rake task should not define method .invoke_from_app_generator on Object' do + require "#{app_path}/config/environment" + load_tasks + + assert_raise NameError do + Object.method(:invoke_from_app_generator) + end + end + end + end +end |