Commit Graph

7 Commits

Author SHA1 Message Date
yuuji.yaginuma
87598c8c80 Make automatically synchronize test schema work inside engine
In Rails engine, migration files are in under `db/migrate` of engine.
Therefore, when rake task is executed in engine, `db/migrate` is
automatically added to `DatabaseTasks.migrations_paths`.
a18cf23a9c/activerecord/lib/active_record/railtie.rb (L39..L43)

However, if execute the rake task under dummy app, migration files will not
be loaded because engine's migration path setting process is not called.

Therefore, in order to load migration files correctly, it is necessary to
execute rake task under engine.

Fixes #30765
2017-10-02 15:50:58 +09:00
Pat Allan
acea68de02 Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
yuuji.yaginuma
af4cef024b Extract assert_output and available_pty? into ConsoleHelpers module
We define almost the same method with multiple tests. Therefore, it extract
into module.
2017-07-25 15:01:33 +09:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
yuuji.yaginuma
2a5c116f12 make all rails commands work in engine
Currently, all rails commands can be executed in engine,
but `server`, `console`, `dbconsole` and `runner` do not work.

This make all rails commands work in engine.
Related to #22588
2017-01-09 10:07:48 +09:00
yuuji.yaginuma
6fc8b54621 add missing require rake
In ff8035dfeed8c86594c32ef8e9204806e190cb58, require rake is deferred.
Therefore, it is necessary to require rake even `Engine::CommandsTasks.
2016-08-11 20:54:23 +09:00