diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/engine.rb | 6 | ||||
-rw-r--r-- | railties/test/railties/shared_tests.rb | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index e9ce9610b8..86a8374ded 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -547,6 +547,12 @@ module Rails Rake::Task["railties:install:migrations"].invoke end end + + desc "Copy assets from #{railtie_name} to application" + task :assets do + ENV["FROM"] = railtie_name + Rake::Task["railties:install:assets"].invoke + end end end diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index b1d7580dff..9f48c7acfd 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -43,24 +43,24 @@ module RailtiesTest add_to_config "ActiveRecord::Base.timestamped_migrations = false" Dir.chdir(app_path) do - output = `rake bukkits:install:migrations 2>&1` + output = `rake bukkits:install:migrations` assert File.exists?("#{app_path}/db/migrate/2_create_users.rb") assert File.exists?("#{app_path}/db/migrate/3_add_last_name_to_users.rb") assert_match /Copied migration 2_create_users.rb from bukkits/, output assert_match /Copied migration 3_add_last_name_to_users.rb from bukkits/, output - assert_match /WARNING: Migration 3_create_sessions.rb from bukkits has been skipped/, output + assert_match /NOTE: Migration 3_create_sessions.rb from bukkits has been skipped/, output assert_equal 3, Dir["#{app_path}/db/migrate/*.rb"].length - output = `rake railties:install:migrations 2>&1` + output = `rake railties:install:migrations` assert File.exists?("#{app_path}/db/migrate/4_create_yaffles.rb") - assert_match /WARNING: Migration 3_create_sessions.rb from bukkits has been skipped/, output + assert_match /NOTE: Migration 3_create_sessions.rb from bukkits has been skipped/, output assert_match /Copied migration 4_create_yaffles.rb from acts_as_yaffle/, output assert_no_match /2_create_users/, output migrations_count = Dir["#{app_path}/db/migrate/*.rb"].length - output = `rake railties:install:migrations 2>&1` + output = `rake railties:install:migrations` assert_equal migrations_count, Dir["#{app_path}/db/migrate/*.rb"].length end |