1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/test/application
schneems 707be603cf ensure environment is run before db:structure:load
Right now `db:drop` depends on `load_config` since so when `db:drop` gets executed `load_config` gets run. `db:structure:load` depends on `[:environment, :load_config]`. So before it runs, it executes `environment` but because `load_config` has already executed it is skipped. Note `db:load_config` is "invoke"-d twice, but only "execute"-d once:

```
** Invoke db:drop (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:drop
** Invoke db:structure:load (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config
** Execute db:structure:load
```

The fix for this is making sure that the environment is run before any `load_config`:

```
** Invoke environment (first_time)
** Execute environment
** Invoke db:drop (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:drop
** Invoke db:structure:load (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:structure:load
```
2013-12-25 18:03:55 -05:00
..
initializers Use Full path to sqlite database in tests 2013-12-22 00:56:59 -05:00
middleware Replace config.secret_key_base with secrets.secret_key_base in test 2013-12-12 14:59:11 -05:00
rack Tune up Rails::Rack::Logger. Only put space between requests in development logs. 2012-09-26 15:19:34 -07:00
rake ensure environment is run before db:structure:load 2013-12-25 18:03:55 -05:00
asset_debugging_test.rb Calls to the application constant have been refactored to use 2013-06-10 20:59:37 -07:00
assets_test.rb More Warnings removed for ruby trunk 2013-11-01 13:47:23 +01:00
build_original_fullpath_test.rb
configuration_test.rb Fix tests names: tokens.yml => secrets.yml 2013-12-25 17:34:25 -05:00
console_test.rb cleanup railties test; fix typos 2013-03-31 20:50:21 +05:30
generators_test.rb Introduce ./bin for your app's executables: bin/bundle, bin/rails, bin/rake. Executable scripts are versioned code like the rest of your app. To generate a stub for a bundled gem: 'bundle binstubs unicorn' and 'git add bin/unicorn' 2013-01-06 21:41:36 -07:00
loading_test.rb Use block instead passing as argument 2013-07-02 00:24:51 -03:00
mailer_previews_test.rb Add mailer previews feature based on mail_view gem 2013-12-17 03:58:35 +00:00
middleware_test.rb Merge pull request #12365 from jbaudanza/reorder 2013-12-01 22:42:26 -08:00
multiple_applications_test.rb Fix typos: the indefinite articles(a -> an) 2013-09-13 20:44:37 +09:00
paths_test.rb Revert "Deprecate the eager_load_paths configuration" 2013-02-19 07:22:37 +00:00
rackup_test.rb
rake_test.rb Regression test for load_structure and clone_structure 2013-12-14 18:00:17 -05:00
rendering_test.rb Calls to the application constant have been refactored to use 2013-06-10 20:59:37 -07:00
routing_test.rb Revert "Match Dev/Prod parity for Index Page" 2013-07-22 17:19:07 +02:00
runner_test.rb script => bin 2013-01-18 17:12:47 +09:00
test_runner_test.rb Updates to make rails 4 happy with minitest 5: 2013-05-06 17:38:45 -07:00
test_test.rb BACKTRACE environment variable to show unfiltered backtraces. 2013-11-04 10:00:44 +01:00
url_generation_test.rb Missing AV requires in railties tests 2013-08-25 11:39:13 +02:00