Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix engine rake task #1963

Merged
merged 1 commit into from

3 participants

@jake3030

Updated the engine rake task so that it loads the tasks.

@dmathieu
Collaborator

Could you clean up and rebase your PR to avoid the two noise commits ?

railties/test/generators/plugin_new_generator_test.rb
@@ -151,7 +151,7 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
quietly { system 'bundle install' }
assert_match(/1 tests, 1 assertions, 0 failures, 0 errors/, `bundle exec rake test`)
end
-
+
@dmathieu Collaborator
dmathieu added a note

Useless whitespaces here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@josevalim
Owner

There is some discussion about this on #1356

@jake3030

Damien: Just updated the code to a cleaner commit.

Jose: I just checked that commit and it fixed one part of the rake problem, but it doesnt fix the loading of the tasks. I created a test for it to illustrate. The actual fix is only one line of code so you could comment it out (railties/lib/rails/tasks/engine.rake:71) and then run the test to see the problem.

thanks

jake

@josevalim josevalim merged commit eb2e109 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 4, 2011
  1. @jake3030

    fix engines rake tasks

    jake3030 authored
This page is out of date. Refresh to see the latest.
View
2  railties/lib/rails/tasks/engine.rake
@@ -67,3 +67,5 @@ def find_engine_path(path)
find_engine_path(File.expand_path('..', path))
end
end
+
+Rake.application.invoke_task(:load_app)
View
8 railties/test/generators/plugin_new_generator_test.rb
@@ -159,6 +159,14 @@ def test_ensure_that_tests_works_in_full_mode
assert_match(/1 tests, 1 assertions, 0 failures, 0 errors/, `bundle exec rake test`)
end
+ def test_ensure_that_migration_tasks_work_with_mountable_option
+ run_generator [destination_root, "--mountable"]
+ FileUtils.cd destination_root
+ quietly { system 'bundle install' }
+ `bundle exec rake db:migrate`
+ assert_equal 0, $?.exitstatus
+ end
+
def test_creating_engine_in_full_mode
run_generator [destination_root, "--full"]
assert_file "app/assets/javascripts/bukkits"
Something went wrong with that request. Please try again.