1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add test case that active_storage:install task works within engine

Follow up of #31391
This commit is contained in:
yuuji.yaginuma 2017-12-17 09:10:36 +09:00
parent 28d2968533
commit c5b900da73

View file

@ -1479,6 +1479,21 @@ YAML
assert_equal "/fruits/2/bukkits/posts", last_response.body
end
test "active_storage:install task works within engine" do
@plugin.write "Rakefile", <<-RUBY
APP_RAKEFILE = '#{app_path}/Rakefile'
load 'rails/tasks/engine.rake'
RUBY
Dir.chdir(@plugin.path) do
output = `bundle exec rake app:active_storage:install`
assert $?.success?, output
active_storage_migration = migrations.detect { |migration| migration.name == "CreateActiveStorageTables" }
assert active_storage_migration
end
end
private
def app
Rails.application