diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2019-01-17 13:28:12 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2019-01-17 16:08:35 -0500 |
commit | 4d51efe24e461a2a3ed562787308484cd48370c7 (patch) | |
tree | 17eac6cc7a6c8f71740499d4a97f0d7fbc640ec3 /railties/test/generators | |
parent | fa791fb8e2a718b5d0430c7ca5a454678dfc192d (diff) | |
download | rails-4d51efe24e461a2a3ed562787308484cd48370c7.tar.gz rails-4d51efe24e461a2a3ed562787308484cd48370c7.tar.bz2 rails-4d51efe24e461a2a3ed562787308484cd48370c7.zip |
Remove deprecated `after_bundle` helper inside plugins templates
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/plugin_generator_test.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 66286fc554..4ec656d18b 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -712,38 +712,6 @@ class PluginGeneratorTest < Rails::Generators::TestCase Object.send(:remove_const, "ENGINE_ROOT") end - def test_after_bundle_callback - path = "http://example.org/rails_template" - template = +%{ after_bundle { run "echo ran after_bundle" } } - template.instance_eval "def read; self; end" # Make the string respond to read - - check_open = -> *args do - assert_equal [ path, "Accept" => "application/x-thor-template" ], args - template - end - - sequence = ["echo ran after_bundle"] - @sequence_step ||= 0 - ensure_bundler_first = -> command do - assert_equal sequence[@sequence_step], command, "commands should be called in sequence #{sequence}" - @sequence_step += 1 - end - - content = nil - generator([destination_root], template: path).stub(:open, check_open, template) do - generator.stub(:bundle_command, ensure_bundler_first) do - generator.stub(:run, ensure_bundler_first) do - silence_stream($stdout) do - content = capture(:stderr) { generator.invoke_all } - end - end - end - end - - assert_equal 1, @sequence_step - assert_match(/DEPRECATION WARNING: `after_bundle` is deprecated/, content) - end - private def action(*args, &block) |