Commit Graph

10 Commits

Author SHA1 Message Date
bogdanvlviv 0835527d6b
`rails new` runs `rails active_storage:install`
Omit `rails activestorage:install` for jdbcmysql, jdbc and shebang tests

AppGeneratorTest#test_config_jdbcmysql_database

  rails aborted!
  LoadError: Could not load 'active_record/connection_adapters/mysql_adapter'.
  Make sure that the adapter in config/database.yml is valid.
  If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add
  the necessary adapter gem to the Gemfile.
  (compressed)
  bin/rails:4:in `<main>'
  Tasks: TOP => activestorage:install => environment
  (See full trace by running task with --trace)

AppGeneratorTest#test_config_jdbc_database

  rails aborted!
  LoadError: Could not load 'active_record/connection_adapters/jdbc_adapter'.
  Make sure that the adapter in config/database.yml is valid.
  If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add
  the necessary adapter gem to the Gemfile.
  (compressed)
  bin/rails:4:in `<main>'
  Tasks: TOP => activestorage:install => environment
  (See full trace by running task with --trace)

AppGeneratorTest#test_shebang_is_added_to_rails_file

  /home/ubuntu/.rbenv/versions/2.4.1/bin/ruby: no Ruby script found in input (LoadError)

Prevent PendingMigrationError in tests

 * Run `bin/rails db:migrate RAILS_ENV=test` in test_cases before start tests to prevent PendingMigrationError
 * FileUtils.rm_r("db/migrate")
 * --skip-active-storage

Fix failed tests in `railties/test/railties/engine_test.rb`

Related to #30111

Imporve `SharedGeneratorTests#test_default_frameworks_are_required_when_others_are_removed`

 - Explicitly skip active_storage
 - Ensure that skipped frameworks are commented
 - Ensure that default frameworks are not commented

Fix error `Errno::ENOSPC: No space left on device - sendfile`

Since `rails new` runs `rails active_storage:install`
that boots an app.

Since adding Bootsnap 0312a5c67e
during booting an app, it creates the cache:

   264K    tmp/cache/bootsnap-load-path-cache
   27M     tmp/cache/bootsnap-compile-cache

* teardown_app must remove app
2017-11-06 21:29:14 +00:00
Matthew Draper 802ce8a239 Run in-app rails commands via fork+load where possible
While this avoids shell argument parsing, we still pass through
everything in our stack.
2017-09-04 20:19:39 +09:30
Pat Allan acea68de02 Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
Matthew Draper 87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Xavier Noria 783763bde9 applies new string literal convention in railties/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:16:09 +02:00
Santiago Pastorino 1a2f1c48bd There are some cases where @@app is not defined 2016-07-26 22:04:56 -03:00
Prathamesh Sonpatki d93427840e
Remove unused boot_rails method and it's usage
- The `boot_rails` method from abstract_unit.rb is empty after 2abcdfd978.
- So let's remove it and its usage.
2016-07-04 09:34:21 +05:30
Teo Ljungberg 5a0dddda09
Address ruby warnings
- Ambiguous first argument
- Mismatched indentation
2016-02-29 09:04:57 +01:00
Yves Senn 9d37874732 reset `ActionMailer::Base.deliveries` in `ActionDispatch::IntegrationTest`.
Whenever you are sending emails in integration tests using the `:test`
delivery method you need to make sure that
`ActionMailer::Base.deliveries` is reset after every test. This piece of
boilerplate code is present in all my applications that send
emails. Let's have `ActionDispatch::IntegrationTest` reset the
deliveries automatically.
2016-02-16 11:20:59 +01:00