diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-10-10 15:03:57 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-10-14 07:46:12 +0200 |
commit | f07cbec865093c30299ad038d52e3e70e2527848 (patch) | |
tree | 030788ff1cbda52a8be38de766b36a61fe88d5ce /railties | |
parent | ab1a66153360231e60c2c115aff599dcd314e309 (diff) | |
download | rails-f07cbec865093c30299ad038d52e3e70e2527848.tar.gz rails-f07cbec865093c30299ad038d52e3e70e2527848.tar.bz2 rails-f07cbec865093c30299ad038d52e3e70e2527848.zip |
Do not treat information about skipped migrations as WARNINGs but as a NOTEs, also puts to stdin
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 |